Axiom.Core.SceneManager.RemoveEntity C# (CSharp) Method

RemoveEntity() public method

Removes the specified entity from the scene.
public RemoveEntity ( Entity entity ) : void
entity Entity Entity to remove from the scene.
return void
		public virtual void RemoveEntity( Entity entity )
		{
			this.DestroyMovableObject( entity );
		}

Same methods

SceneManager::RemoveEntity ( string name ) : void

Usage Example

Example #1
0
 protected void ClearCreatedObjects()
 {
     for (int i = 0; i < sceneNodeList.Count; i++)
     {
         SceneNode node   = sceneNodeList[i];
         Entity    entity = entityList[i];
         node.DetachObject(entity);
         scene.RemoveEntity(entity);
         node.RemoveFromParent();
     }
     sceneNodeList.Clear();
     entityList.Clear();
     foreach (Material material in materialList)
     {
         material.Dispose();
         MaterialManager.Instance.Unload(material);
     }
     materialList.Clear();
     foreach (Texture texture in textureList)
     {
         texture.Dispose();
         TextureManager.Instance.Unload(texture);
     }
     textureList.Clear();
     totalVertexCount = 0;
 }
SceneManager