#include <iEntity.h>
◆ iEntity() [1/3]
igor::iEntity::iEntity |
( |
| ) |
|
|
default |
◆ iEntity() [2/3]
igor::iEntity::iEntity |
( |
const iEntity & |
other | ) |
|
|
default |
copy ctor
- Parameters
-
other | the entity to make a copy from |
◆ iEntity() [3/3]
param ctor
- Parameters
-
entity | the entity handle |
scene | the scene this entity belongs to |
◆ addBehaviour()
void igor::iEntity::addBehaviour |
( |
const iBehaviourDelegate & |
behaviour, |
|
|
const std::any & |
userData = std::any() |
|
) |
| |
adds behaviour to entity
- Parameters
-
behaviour | the behaviour to be added |
userData | user data added to behaviour |
◆ addComponent()
template<typename T >
T & igor::iEntity::addComponent |
( |
const T & |
component | ) |
|
|
inline |
adds component to entity
- Parameters
-
component | the component to add |
◆ addUserComponent()
template<typename T >
T & igor::iEntity::addUserComponent |
( |
const T & |
component | ) |
|
|
inline |
◆ getComponent()
template<typename T >
T & igor::iEntity::getComponent |
( |
| ) |
|
|
inline |
- Returns
- component of entity of given type
◆ getID()
◆ getMotionInteractionType()
- Returns
- motion interaction type
◆ getName()
const iaString igor::iEntity::getName |
( |
| ) |
const |
◆ getParent()
- Returns
- the parent id or invalid id if there is no parent
◆ getUserComponent()
template<typename T >
T & igor::iEntity::getUserComponent |
( |
| ) |
|
|
inline |
◆ isActive()
bool igor::iEntity::isActive |
( |
| ) |
const |
- Returns
- true if entity is active
◆ isValid()
bool igor::iEntity::isValid |
( |
| ) |
const |
- Returns
- true if entity is valid
◆ removeBehaviour()
removes behaviour from entity
- Parameters
-
behaviour | the behaviour to be removed |
◆ removeComponent()
template<typename T >
void igor::iEntity::removeComponent |
( |
| ) |
|
|
inline |
removes component of given type
◆ setActive()
void igor::iEntity::setActive |
( |
bool |
active | ) |
|
sets entity active
- Parameters
-
active | if true entity is active |
◆ setMotionInteractionType()
sets motion interaction type
- Parameters
-
interactionType | the motion interaction type |
◆ setName()
void igor::iEntity::setName |
( |
const iaString & |
name | ) |
|
sets name of entity
- Parameters
-
◆ setParent()
void igor::iEntity::setParent |
( |
iEntityID |
parent | ) |
|
set parent of entity
- Parameters
-
parent | the parent id to use. if parent id invalid the parent relationship is reset |
◆ tryGetComponent()
template<typename T >
T * igor::iEntity::tryGetComponent |
( |
| ) |
const |
|
inline |
- Returns
- component of entity of given type
returns nullptr in case component does not exist
◆ tryGetUserComponent()
template<typename T >
T * igor::iEntity::tryGetUserComponent |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- /home/maddin/dev/Igor/src/igor/igor/entities/iEntity.h
- /home/maddin/dev/Igor/src/igor/igor/entities/iEntity.cpp