/// <summary> /// Create the scenegraph Managers. /// </summary> /// <param name="game"></param> public SceneGraphManager(Game game) : base(game) { _root = new Node(); _new = new Queue<Node>(); removeQueue = new Queue<Node>(); _timeOfDay = MathHelper.Pi; _TODspeed = 0.00025f; _useCollisionDetection = true; newObjectsAdded = false; _collidedObjects = new List<Pair<PoorSceneObject, PoorSceneObject>>(); }
public virtual void AddNode(Node newNode) { _nodes.Add(newNode); }
private static int comp(Node x1, Node x2) { SceneObjectNode node1 = (SceneObjectNode)x1; SceneObjectNode node2 = (SceneObjectNode)x2; if (node1.SceneObject.Z == node2.SceneObject.Z) return 0; return node1.SceneObject.Z > node2.SceneObject.Z ? -1 : 1; }