Colobot
Public Member Functions | Protected Attributes | List of all members
CObjectManager Class Reference
Inheritance diagram for CObjectManager:
Inheritance graph
[legend]

Public Member Functions

bool AddObject (CObject *instance)
 Registers new object.
 
bool DeleteObject (CObject *instance)
 Unregisters the object.
 
CObjectGetObjectById (unsigned int id)
 Finds object by id (CObject::GetID())
 
CObjectGetObjectByRank (unsigned int id)
 Gets object by id in range <0; m_table.size())
 
const std::map< unsigned int, CObject * > & GetAllObjects ()
 Returns all objects.
 
void Flush ()
 Removes all objects.
 
CObjectCreateObject (Math::Vector pos, float angle, ObjectType type, float power=-1.f, float zoom=1.f, float height=0.f, bool trainer=false, bool toy=false, int option=0)
 Creates an object.
 
bool DestroyObject (int id)
 Destroys an object.
 
CObjectRadar (CObject *pThis, ObjectType type=OBJECT_NULL, float angle=0.0f, float focus=Math::PI *2.0f, float minDist=0.0f, float maxDist=1000.0f, bool furthest=false, RadarFilter filter=FILTER_NONE, bool cbotTypes=false)
 Finds an object, like radar() in CBot.
 
CObjectRadar (CObject *pThis, std::vector< ObjectType > type=std::vector< ObjectType >(), float angle=0.0f, float focus=Math::PI *2.0f, float minDist=0.0f, float maxDist=1000.0f, bool furthest=false, RadarFilter filter=FILTER_NONE, bool cbotTypes=false)
 
CObjectRadar (CObject *pThis, Math::Vector thisPosition, float thisAngle, ObjectType type=OBJECT_NULL, float angle=0.0f, float focus=Math::PI *2.0f, float minDist=0.0f, float maxDist=1000.0f, bool furthest=false, RadarFilter filter=FILTER_NONE, bool cbotTypes=false)
 
CObjectRadar (CObject *pThis, Math::Vector thisPosition, float thisAngle, std::vector< ObjectType > type=std::vector< ObjectType >(), float angle=0.0f, float focus=Math::PI *2.0f, float minDist=0.0f, float maxDist=1000.0f, bool furthest=false, RadarFilter filter=FILTER_NONE, bool cbotTypes=false)
 
CObjectFindNearest (CObject *pThis, ObjectType type=OBJECT_NULL, float maxDist=1000.0f, bool cbotTypes=false)
 Returns nearest object that's closer than maxDist.
 
CObjectFindNearest (CObject *pThis, std::vector< ObjectType > type=std::vector< ObjectType >(), float maxDist=1000.0f, bool cbotTypes=false)
 
CObjectFindNearest (CObject *pThis, Math::Vector thisPosition, ObjectType type=OBJECT_NULL, float maxDist=1000.0f, bool cbotTypes=false)
 
CObjectFindNearest (CObject *pThis, Math::Vector thisPosition, std::vector< ObjectType > type=std::vector< ObjectType >(), float maxDist=1000.0f, bool cbotTypes=false)
 

Protected Attributes

std::map< unsigned int, CObject * > m_table
 

Additional Inherited Members

- Static Public Member Functions inherited from CSingleton< CObjectManager >
static CObjectManagerGetInstance ()
 
static CObjectManagerGetInstancePointer ()
 
static bool IsCreated ()
 
- Static Protected Attributes inherited from CSingleton< CObjectManager >
static CObjectManagerm_instance = nullptr
 

The documentation for this class was generated from the following files: