|
Colobot
|
Manages CObject instances. More...
#include <src/object/object_manager.h>

Public Member Functions | |
| CObjectManager (Gfx::CEngine *engine, Gfx::CTerrain *terrain, Gfx::COldModelManager *oldModelManager, Gfx::CModelManager *modelManager, Gfx::CParticle *particle) | |
| CObject * | CreateObject (ObjectCreateParams params) |
| Creates an object. More... | |
| CObject * | CreateObject (Math::Vector pos, float angle, ObjectType type, float power=-1.0f) |
| bool | DeleteObject (CObject *instance) |
| Deletes the object. More... | |
| void | DeleteAllObjects () |
| Deletes all objects. More... | |
| CObject * | GetObjectById (unsigned int id) |
| Finds object by id (CObject::GetID()) More... | |
| CObject * | GetObjectByRank (unsigned int id) |
| Gets object by id in range <0; number of objects - 1> More... | |
| std::vector< CObject * > | GetObjectsOfTeam (int team) |
| Gets all objects of given team. More... | |
| bool | TeamExists (int team) |
| Checks if any of team's objects exist. More... | |
| void | DestroyTeam (int team, DestructionType destructionType=DestructionType::Explosion) |
| Destroy all objects of team. More... | |
| int | CountObjectsImplementing (ObjectInterfaceType interface) |
| Counts all objects implementing given interface. More... | |
| CObjectContainerProxy | GetAllObjects () |
| Returns all objects. More... | |
| std::vector< CObject * > | RadarAll (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. More... | |
| std::vector< CObject * > | RadarAll (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) |
| std::vector< CObject * > | RadarAll (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) |
| std::vector< CObject * > | RadarAll (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) |
| CObject * | Radar (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. More... | |
| CObject * | Radar (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) |
| CObject * | Radar (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) |
| CObject * | Radar (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) |
| CObject * | FindNearest (CObject *pThis, ObjectType type=OBJECT_NULL, float maxDist=1000.0f, bool cbotTypes=false) |
| Returns nearest object that's closer than maxDist. More... | |
| CObject * | FindNearest (CObject *pThis, std::vector< ObjectType > type=std::vector< ObjectType >(), float maxDist=1000.0f, bool cbotTypes=false) |
| CObject * | FindNearest (CObject *pThis, Math::Vector thisPosition, ObjectType type=OBJECT_NULL, float maxDist=1000.0f, bool cbotTypes=false) |
| CObject * | FindNearest (CObject *pThis, Math::Vector thisPosition, std::vector< ObjectType > type=std::vector< ObjectType >(), float maxDist=1000.0f, bool cbotTypes=false) |
Additional Inherited Members | |
Static Public Member Functions inherited from CSingleton< CObjectManager > | |
| static CObjectManager & | GetInstance () |
| static CObjectManager * | GetInstancePointer () |
| static bool | IsCreated () |
Static Protected Attributes inherited from CSingleton< CObjectManager > | |
| static CObjectManager * | m_instance |
Manages CObject instances.
| CObject * CObjectManager::CreateObject | ( | ObjectCreateParams | params | ) |
Creates an object.
| bool CObjectManager::DeleteObject | ( | CObject * | instance | ) |
Deletes the object.
| void CObjectManager::DeleteAllObjects | ( | ) |
Deletes all objects.
| CObject * CObjectManager::GetObjectById | ( | unsigned int | id | ) |
Finds object by id (CObject::GetID())
| CObject * CObjectManager::GetObjectByRank | ( | unsigned int | id | ) |
Gets object by id in range <0; number of objects - 1>
| std::vector< CObject * > CObjectManager::GetObjectsOfTeam | ( | int | team | ) |
Gets all objects of given team.
| bool CObjectManager::TeamExists | ( | int | team | ) |
Checks if any of team's objects exist.
| void CObjectManager::DestroyTeam | ( | int | team, |
| DestructionType | destructionType = DestructionType::Explosion |
||
| ) |
Destroy all objects of team.
| int CObjectManager::CountObjectsImplementing | ( | ObjectInterfaceType | interface | ) |
Counts all objects implementing given interface.
|
inline |
Returns all objects.
| std::vector< CObject * > CObjectManager::RadarAll | ( | 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.
| CObject * CObjectManager::Radar | ( | 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.
| CObject * CObjectManager::FindNearest | ( | CObject * | pThis, |
| ObjectType | type = OBJECT_NULL, |
||
| float | maxDist = 1000.0f, |
||
| bool | cbotTypes = false |
||
| ) |
Returns nearest object that's closer than maxDist.
1.8.16