public virtual int CompareTo(object other) { SceneObject o = (SceneObject)other; if (this.DistanceSquared < o.DistanceSquared) return -1; else if (this.DistanceSquared > o.DistanceSquared) return 1; else return 0; }