상속: Axiom.Core.SceneManager
예제 #1
0
		public OctreeZone( PCZSceneManager creator, string name )
			: base( creator, name )
		{
			mZoneTypeName = "ZoneType_Octree";
			// init octree
			AxisAlignedBox b = new AxisAlignedBox( new Vector3( -10000, -10000, -10000 ), new Vector3( 10000, 10000, 10000 ) );
			int depth = 8;
			rootOctree = null;
			Init( b, depth );
		}
        public void TestChildSceneNodeRemoval()
        {
            SceneManager sceneManager = new PCZSceneManager( "Manager under test" );
            SceneNode node = sceneManager.CreateSceneNode( "testNode" );
            SceneNode childNode = node.CreateChildSceneNode( "childNode" );

            Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." );

            node.RemoveChild( childNode.Name );

            Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was removed from its parent but also incorrectly removed from the scene graph." );
        }
        public void TestChildSceneNodeDestruction()
        {
            SceneManager sceneManager = new PCZSceneManager( "Manager under test" );
            SceneNode node = sceneManager.CreateSceneNode( "testNode" );
            SceneNode childNode = node.CreateChildSceneNode( "childNode" );

            Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." );

            node.RemoveAndDestroyChild( childNode.Name );

            Assert.IsFalse( ManagerContainsNode( sceneManager, childNode ), "A child node was destroryed but not removed from the scene graph." );
        }
예제 #4
0
		public DefaultZone( PCZSceneManager creator, string name )
			: base( creator, name )
		{
			mZoneTypeName = "ZoneType_Default";
		}
예제 #5
0
		public PCZone( PCZSceneManager creator, string name )
		{
			this.mLastVisibleFrame = 0;
			LastVisibleFromCamera = null;
			this.mName = name;
			this.mZoneTypeName = "ZoneType_Undefined";
			this.mEnclosureNode = null;
			this.mPCZSM = creator;
			HasSky = false;
		}
예제 #6
0
		public override PCZone CreatePCZone( PCZSceneManager pczsm, string zoneName )
		{
			return new OctreeZone( pczsm, zoneName );
		}
예제 #7
0
		public MovableObject CreateInstance( string name, PCZSceneManager manager, NameValuePairList para )
		{
			throw new NotImplementedException();
		}
예제 #8
0
		public abstract PCZone CreatePCZone( PCZSceneManager pczsm, string zoneName );
예제 #9
0
		public PCZone CreatePCZone( PCZSceneManager pczsm, string zoneType, string zoneName )
		{
			//find a factory that supports this zone type and then call createPCZone() on it
			PCZone inst = null;
			foreach ( PCZoneFactory factory in pCZoneFactories.Values )
			{
				if ( factory.SupportsPCZoneType( zoneType ) )
				{
					// use this factory
					inst = factory.CreatePCZone( pczsm, zoneName );
				}
			}
			if ( null == inst )
			{
				// Error!
				throw new AxiomException( "No factory found for zone of type '" + zoneType +
										 "' PCZoneFactoryManager.CreatePCZone" );
			}
			return inst;
		}