예제 #1
0
        /// <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>>();
        }
예제 #2
0
파일: Node.cs 프로젝트: trew/PoorJetX
 public virtual void AddNode(Node newNode)
 {
     _nodes.Add(newNode);
 }
예제 #3
0
        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;
        }