Beispiel #1
0
        public static void Dump()
        {
            CollisionPairManager pMan = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.BaseDump();
        }
        public static void Print()
        {
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            pInstance.PrintNodes();
        }
        public static void Remove(CollisionPair pNode)
        {
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            Debug.Assert(pNode != null);
            pInstance.BaseRemove(pNode);
        }
Beispiel #4
0
        public static CollisionPair GetCurrentCollisionPair()
        {
            CollisionPairManager pMan = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pMan != null);
            Debug.Assert(pMan.pCurrentCollisionPair != null);

            return(pMan.pCurrentCollisionPair);
        }
Beispiel #5
0
        public static CollisionPair Add(CollisionPair.Name colPairName, GameObject treeA, GameObject treeB)
        {
            CollisionPairManager pMan = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            CollisionPair pPair = (CollisionPair)pMan.BaseAdd();

            Debug.Assert(pPair != null);

            pPair.SetCollisionPair(colPairName, treeA, treeB);
            return(pPair);
        }
        public static CollisionPair Find(CollisionPair.Name name)
        {
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            // Compare functions only compares two Nodes

            // So:  Use the Compare Node - as a reference
            //      use in the Compare() function
            pInstance.poNodeCompare.SetName(name);

            CollisionPair pData = (CollisionPair)pInstance.BaseFind(pInstance.poNodeCompare);

            return(pData);
        }
        public static CollisionPair Add(CollisionPair.Name colpairName, GameObject treeRootA, GameObject treeRootB)
        {
            // Get the instance
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            // Go to Man, get a node from reserve, add to active, return it
            CollisionPair pColPair = (CollisionPair)pInstance.BaseAdd();

            Debug.Assert(pColPair != null);

            // Initialize Image
            pColPair.Set(colpairName, treeRootA, treeRootB);

            return(pColPair);
        }
Beispiel #8
0
        public static void Process()
        {
            CollisionPairManager pMan = CollisionPairManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            CollisionPair pPair = (CollisionPair)pMan.BaseGetActive();

            Debug.Assert(pPair != null);

            while (pPair != null)
            {
                pMan.pCurrentCollisionPair = pPair;
                pPair.Process();
                pPair = (CollisionPair)pPair.pNext;
            }
        }
        public static void Process()
        {
            // get the singleton
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            CollisionPair pColPair = (CollisionPair)pInstance.BaseGetActive();

            while (pColPair != null)
            {
                // set the current active
                pInstance.pActiveColPair = pColPair;

                // do the check for a single pair
                pColPair.Process();

                // advance to next
                pColPair = (CollisionPair)pColPair.GetNext();
            }
        }
        public static CollisionPair GetActiveColPair()
        {
            CollisionPairManager pInstance = CollisionPairManager.PrivGetInstance();

            return(pInstance.pActiveColPair);
        }