Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Classes | |
struct | DefaultComponentFilter |
Finds all entities with a given component belonging to any given player. More... | |
Functions | |
entity_id_t | PickEntityAtPoint (CSimulation2 &simulation, const CCamera &camera, int screenX, int screenY, player_id_t player, bool allowEditorSelectables) |
Finds all selectable entities under the given screen coordinates. More... | |
std::vector< entity_id_t > | PickEntitiesInRect (CSimulation2 &simulation, const CCamera &camera, int sx0, int sy0, int sx1, int sy1, player_id_t owner, bool allowEditorSelectables) |
Finds all selectable entities within the given screen coordinate rectangle, belonging to the given player. More... | |
std::vector< entity_id_t > | PickNonGaiaEntitiesInRect (CSimulation2 &simulation, const CCamera &camera, int sx0, int sy0, int sx1, int sy1, bool allowEditorSelectables) |
Finds all selectable entities within the given screen coordinate rectangle, belonging to any given player (excluding Gaia). More... | |
template<typename Filter = DefaultComponentFilter> | |
std::vector< entity_id_t > | GetEntitiesWithComponentInRect (CSimulation2 &simulation, int cid, const CCamera &camera, int sx0, int sy0, int sx1, int sy1) |
std::vector< entity_id_t > | PickSimilarEntities (CSimulation2 &simulation, const CCamera &camera, const std::string &templateName, player_id_t owner, bool includeOffScreen, bool matchRank, bool allowEditorSelectables, bool allowFoundations) |
Finds all entities with the given entity template name, belonging to the given player. More... | |
std::vector< entity_id_t > EntitySelection::GetEntitiesWithComponentInRect | ( | CSimulation2 & | simulation, |
int | cid, | ||
const CCamera & | camera, | ||
int | sx0, | ||
int | sy0, | ||
int | sx1, | ||
int | sy1 | ||
) |
std::vector< entity_id_t > EntitySelection::PickEntitiesInRect | ( | CSimulation2 & | simulation, |
const CCamera & | camera, | ||
int | sx0, | ||
int | sy0, | ||
int | sx1, | ||
int | sy1, | ||
player_id_t | owner, | ||
bool | allowEditorSelectables | ||
) |
Finds all selectable entities within the given screen coordinate rectangle, belonging to the given player.
Used for bandboxing.
camera | use this view to convert screen to world coordinates. |
sx0,sy0,sx1,sy1 | diagonally opposite corners of the rectangle in 2D screen coordinates. |
owner | player whose entities we are selecting. Ownership is ignored if INVALID_PLAYER is used. |
allowEditorSelectables | if true, all entities with the ICmpSelectable interface will be selected (including decorative actors), else only those selectable ingame. |
entity_id_t EntitySelection::PickEntityAtPoint | ( | CSimulation2 & | simulation, |
const CCamera & | camera, | ||
int | screenX, | ||
int | screenY, | ||
player_id_t | player, | ||
bool | allowEditorSelectables | ||
) |
Finds all selectable entities under the given screen coordinates.
camera | use this view to convert screen to world coordinates. |
screenX,screenY | 2D screen coordinates. |
player | player whose LOS will be used when selecting entities. In Atlas this value is ignored as the whole map is revealed. |
allowEditorSelectables | if true, all entities with the ICmpSelectable interface will be selected (including decorative actors), else only those selectable ingame. |
range | Approximate range to check for entity in. |
std::vector< entity_id_t > EntitySelection::PickNonGaiaEntitiesInRect | ( | CSimulation2 & | simulation, |
const CCamera & | camera, | ||
int | sx0, | ||
int | sy0, | ||
int | sx1, | ||
int | sy1, | ||
bool | allowEditorSelectables | ||
) |
Finds all selectable entities within the given screen coordinate rectangle, belonging to any given player (excluding Gaia).
Used for status bars.
std::vector< entity_id_t > EntitySelection::PickSimilarEntities | ( | CSimulation2 & | simulation, |
const CCamera & | camera, | ||
const std::string & | templateName, | ||
player_id_t | owner, | ||
bool | includeOffScreen, | ||
bool | matchRank, | ||
bool | allowEditorSelectables, | ||
bool | allowFoundations | ||
) |
Finds all entities with the given entity template name, belonging to the given player.
camera | use this view to convert screen to world coordinates. |
templateName | the name of the template to match, or the selection group name for similar matching. |
owner | player whose entities we are selecting. Ownership is ignored if INVALID_PLAYER is used. |
includeOffScreen | if true, then all entities visible in the world will be selected, else only entities visible to the camera will be selected. |
matchRank | if true, only entities that exactly match templateName will be selected, else entities with matching SelectionGroupName will be selected. |
allowEditorSelectables | if true, all entities with the ICmpSelectable interface will be selected (including decorative actors), else only those selectable in-game. |
allowFoundations | if true, foundations are also included in the results. Only takes effect when matchRank = true. |