Axiom.SceneManagers.PortalConnected.PCZSceneNode.AddZoneToVisitingZonesMap C# (CSharp) Метод

AddZoneToVisitingZonesMap() публичный Метод

public AddZoneToVisitingZonesMap ( PCZone zone ) : void
zone PCZone
Результат void
		public void AddZoneToVisitingZonesMap( PCZone zone )
		{
			visitingZones[ zone.Name ] = zone;
		}
		public void ClearVisitingZonesMap()

Usage Example

Пример #1
0
        /* Recursively check for intersection of the given scene node
         * with zone portals.  If the node touches a portal, then the
         * connected zone is assumed to be touched.  The zone adds
         * the node to its node list and the node adds the zone to
         * its visiting zone list.
         *
         * NOTE: This function assumes that the home zone of the node
         *       is correct.  The function "_updateHomeZone" in PCZSceneManager
         *		 takes care of this and should have been called before
         *		 this function.
         */

        public override void CheckNodeAgainstPortals(PCZSceneNode pczsn, Portal ignorePortal)
        {
            if (pczsn == mEnclosureNode || pczsn.AllowToVisit == false)
            {
                // don't do any checking of enclosure node versus portals
                return;
            }

            PCZone connectedZone;

            foreach (Portal portal in mPortals)
            {
                if (portal != ignorePortal && portal.intersects(pczsn) != PortalIntersectResult.NO_INTERSECT)
                {
                    connectedZone = portal.getTargetZone();

                    if (connectedZone != pczsn.HomeZone && !pczsn.IsVisitingZone(connectedZone))
                    {
                        pczsn.AddZoneToVisitingZonesMap(connectedZone);

                        connectedZone.AddNode(pczsn);

                        connectedZone.CheckNodeAgainstPortals(pczsn, portal.getTargetPortal());
                    }
                }
            }
        }
All Usage Examples Of Axiom.SceneManagers.PortalConnected.PCZSceneNode::AddZoneToVisitingZonesMap