§ Element()
Constructor (when constructer is called just add element that did not change. The objest will be stored in a pool of element and keep a second time if needed == > redure memory allocation, when needed, the system will call the init and un-init function...
§ ~Element()
virtual ege::Element::~Element |
( |
| ) |
|
|
virtual |
§ draw()
virtual void ege::Element::draw |
( |
int32_t |
_pass = 0 | ) |
|
|
pure virtual |
§ drawDebug()
Debug display of the current element.
- Parameters
-
[in,out] | draw | Basic system to draw the debug shape and informations |
Reimplemented in ege::ElementPhysic.
§ drawLife()
draw the current life of the element
§ dynamicDisable()
virtual void ege::Element::dynamicDisable |
( |
| ) |
|
|
inlinevirtual |
§ dynamicEnable()
virtual void ege::Element::dynamicEnable |
( |
| ) |
|
|
inlinevirtual |
§ elementIsRemoved()
Event arrive when an element has been remove from the system == > this permit to keep pointer of ennemy, and not search them every cycle ...
- Parameters
-
[in] | _removedElement | Pointer on the element removed. |
§ getGroup()
int32_t ege::Element::getGroup |
( |
| ) |
const |
|
inline |
get the Group of the element.
- Returns
- The group ID
§ getLifeRatio()
float ege::Element::getLifeRatio |
( |
| ) |
|
get the curent life ratio [0..1]
- Returns
- The proportionnal life
§ getMesh()
get a pointer on the Mesh file.
- Returns
- the mesh pointer.
§ getPosition()
virtual const vec3& ege::Element::getPosition |
( |
| ) |
|
|
virtual |
§ getPositionTheoric()
virtual vec3 ege::Element::getPositionTheoric |
( |
| ) |
|
|
inlinevirtual |
get the theoric position. Sometimes, the element has move due to an explosion or something else, then its real position in not the one that woult it be at the end ...
- Returns
- the theoric position
Reimplemented in ege::ElementPhysic.
§ getRadius()
float ege::Element::getRadius |
( |
| ) |
|
|
inline |
get the current space needed by the element in the workspace
- Returns
- The dimention needed.
§ getType()
virtual const std::string& ege::Element::getType |
( |
| ) |
const |
|
virtual |
§ getUID()
uint32_t ege::Element::getUID |
( |
| ) |
const |
|
inline |
get the curent Element Unique ID in the all Game.
- Returns
- The requested Unique ID.
§ init()
virtual bool ege::Element::init |
( |
| ) |
|
|
virtual |
init the element with the defined properties
- Parameters
-
[in] | _property | Type of the next element |
[in] | _value | pointer on the value type |
- Returns
- true, the element is corectly initialized.
§ isDead()
bool ege::Element::isDead |
( |
| ) |
|
|
inline |
Check if the element is dead.
- Returns
- true if the element does not exist anymore, false otherwise.
§ isFixed()
bool ege::Element::isFixed |
( |
| ) |
|
|
inline |
get the element if it is fixed or not. if the element is fixed this is for tower, and all thing does not really move
- Returns
- true : The element is fixed.
§ loadMesh()
virtual bool ege::Element::loadMesh |
( |
const std::string & |
_meshFileName | ) |
|
|
virtual |
Select a mesh with a specific name.
- Parameters
-
[in] | _meshFileName | filename of the Mesh. |
- Note
- Automaticly load the shape if it is specify in the mesh file
- Returns
- true if no error occured
§ needToRemove()
virtual bool ege::Element::needToRemove |
( |
| ) |
|
|
inlinevirtual |
Request if the element might be removed from the system.
- Returns
- true == > the object is removed
§ onDestroy()
virtual void ege::Element::onDestroy |
( |
| ) |
|
|
inlinevirtual |
, call when the element is removed (call only one time)
Reimplemented in ege::ElementPhysic.
§ onLifeChange()
virtual void ege::Element::onLifeChange |
( |
| ) |
|
|
inlinevirtual |
Call when the element life change.
§ preCalculationDraw()
virtual void ege::Element::preCalculationDraw |
( |
const ege::Camera & |
_camera | ) |
|
|
inlinevirtual |
Can be call tu opdate the list of the element displayed on the scren (example : no display of the hiden triangle)
- Parameters
-
[in] | the | camera properties @ note by default nothing to do ... |
§ setFireOn()
virtual void ege::Element::setFireOn |
( |
int32_t |
_groupIdSource, |
|
|
int32_t |
_type, |
|
|
float |
_power, |
|
|
const vec3 & |
_center = vec3(0, 0, 0) |
|
) |
| |
|
virtual |
apply a fire on the element at a current power and a specific power.
- Parameters
-
[in] | _groupIdSource | Source Id of the group, by default all event arrive at all group, buf some event can not be obviously apply at the ennemy like reparing .... |
[in] | _type | Type of event on the life propertied |
[in] | _power | Power of the event (can be >0 for adding life). |
[in] | _center | Some fire decrease in function of space distance... |
§ setGroup()
void ege::Element::setGroup |
( |
int32_t |
_newGroup | ) |
|
|
inline |
set the group of the curent element
- Parameters
-
[in] | newGroup | The new Group ID of the element. |
§ setMesh()
set the the Mesh properties.
- Parameters
-
[in] | _mesh | The mesh pointer. (nullptr to force the mesh remove ...) |
- Note
- : this remove the shape and the mesh properties.
- Returns
- true if no error occured
Reimplemented in ege::ElementPhysic.
§ setPosition()
virtual void ege::Element::setPosition |
( |
const vec3 & |
_pos | ) |
|
|
inlinevirtual |
§ m_fixe
bool ege::Element::m_fixe |
|
protected |
is a fixed element == > used for placement of every elements
§ m_group
int32_t ege::Element::m_group |
|
protected |
Every element has a generic group.
§ m_life
float ege::Element::m_life |
|
protected |
Current life of the object.
§ m_lifeMax
float ege::Element::m_lifeMax |
|
protected |
Maximum possible life of the element.
§ m_mesh
Mesh of the Element (can be nullptr)
§ m_radius
float ege::Element::m_radius |
|
protected |
Radius of the element (all element have a radius, if == 0 ==> then ghost ...
The documentation for this class was generated from the following file: