private static bool listContainsByReferenceEquals(AgentType agent, ISpatialCollection<AgentType> neighbors) { foreach(AgentType neighbor in neighbors) { if(Object.ReferenceEquals(agent, neighbor)) { return true; } } return false; }
public AgentType(AgentType agent, Point3d position, Point3d refPosition) { this.position = position; this.refPosition = refPosition; }
public bool Equals(AgentType p) { // If parameter is null return false: if ((object)p == null) { return false; } // Return true if the fields match: return this.position.Equals(p.position) && this.refPosition.Equals(p.refPosition); }
public AgentType(AgentType agent) { this.position = agent.position; this.refPosition = agent.refPosition; }