Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

graphics
Class CUnitManager

   in UnitManager.h
   in UnitManager.cpp

class CUnitManager


Field Summary
private int m_NextID
          
private CObjectManager* m_ObjectManager
          
private std::vector< CUnit* > m_Units
          
 
Constructor Summary
CUnitManager()
          CUnitManager destructor
~CUnitManager()
          AddUnit: add given unit to world
 
Method Summary
 void AddUnit( CUnit* unit )
          RemoveUnit: remove given unit from world, but don't delete it
 CUnit* CreateUnit( const CStr& actorName, CEntity* entity, const std::set< CStr >& selections )
          FindByID
 void DeleteAll()
          PickUnit: iterate through units testing given ray against bounds of each unit; return the closest unit, or null if everything missed
 void DeleteUnit( CUnit* unit )
          DeleteAll: remove and delete all units
 CUnit* FindByID( int id ) const
          
 int GetNewID()
          
 const std::vector< CUnit* >& GetUnits() const
          
 CUnit* PickUnit( const CVector3D& origin, const CVector3D& dir, bool entitiesOnly ) const
          CreateUnit: create a new unit and add it to the world
 void RemoveUnit( CUnit* unit )
          DeleteUnit: remove given unit from world and delete it
 void SetNextID( int n )
          
 void SetObjectManager( CObjectManager& objectManager )
          
 

Field Detail

m_NextID

private int m_NextID;

m_ObjectManager

private CObjectManager* m_ObjectManager;

m_Units

private std::vector< CUnit* > m_Units;


Constructor Detail

CUnitManager

public CUnitManager();
CUnitManager destructor

~CUnitManager

public ~CUnitManager();
AddUnit: add given unit to world


Method Detail

AddUnit

public void AddUnit( CUnit* unit );
RemoveUnit: remove given unit from world, but don't delete it

CreateUnit

public CUnit* CreateUnit( const CStr& actorName, CEntity* entity, const std::set< CStr >& selections );
FindByID

DeleteAll

public void DeleteAll();
PickUnit: iterate through units testing given ray against bounds of each unit; return the closest unit, or null if everything missed

DeleteUnit

public void DeleteUnit( CUnit* unit );
DeleteAll: remove and delete all units

FindByID

public CUnit* FindByID( int id ) const;

GetNewID

public int GetNewID();

GetUnits

public const std::vector< CUnit* >& GetUnits() const;

PickUnit

public CUnit* PickUnit( const CVector3D& origin, const CVector3D& dir, bool entitiesOnly ) const;
CreateUnit: create a new unit and add it to the world

RemoveUnit

public void RemoveUnit( CUnit* unit );
DeleteUnit: remove given unit from world and delete it

SetNextID

public void SetNextID( int n );

SetObjectManager

public void SetObjectManager( CObjectManager& objectManager );

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD