Element.hpp
Go to the documentation of this file.
68 };
92 };
123 virtual void setFireOn(int32_t _groupIdSource, int32_t _type, float _power, const vec3& _center=vec3(0,0,0));
162 virtual void drawLife(ememory::SharedPtr<ewol::resource::Colored3DObject> _draw, ememory::SharedPtr<ege::Camera> _camera);
172 virtual void drawDebug(ememory::SharedPtr<ewol::resource::Colored3DObject> _draw, ememory::SharedPtr<ege::Camera> _camera);
205 };
void setGroup(int32_t _newGroup)
set the group of the curent element
Definition: Element.hpp:142
float m_lifeMax
Maximum possible life of the element.
Definition: Element.hpp:95
int32_t getGroup() const
get the Group of the element.
Definition: Element.hpp:135
virtual void dynamicDisable()
remove this element from the physique engine
Definition: Element.hpp:227
virtual void drawDebug(ememory::SharedPtr< ewol::resource::Colored3DObject > _draw, ememory::SharedPtr< ege::Camera > _camera)
Debug display of the current element.
Definition: AudioElement.hpp:8
virtual void draw(int32_t _pass=0)=0
draw the curent element (can have multiple display)
virtual void elementIsRemoved(ememory::SharedPtr< ege::Element > _removedElement)
Event arrive when an element has been remove from the system == > this permit to keep pointer of enne...
Definition: Element.hpp:195
bool isFixed()
get the element if it is fixed or not. if the element is fixed this is for tower, and all thing does ...
Definition: Element.hpp:203
Element(const ememory::SharedPtr< ege::Environement > &_env)
Constructor (when constructer is called just add element that did not change. The objest will be stor...
Definition: Camera.hpp:18
virtual void dynamicEnable()
set the elment in the physique engine
Definition: Element.hpp:223
virtual void onLifeChange()
Call when the element life change.
Definition: Element.hpp:127
float getRadius()
get the current space needed by the element in the workspace
Definition: Element.hpp:213
virtual bool loadMesh(const std::string &_meshFileName)
Select a mesh with a specific name.
uint32_t getUID() const
get the curent Element Unique ID in the all Game.
Definition: Element.hpp:66
virtual void drawLife(ememory::SharedPtr< ewol::resource::Colored3DObject > _draw, ememory::SharedPtr< ege::Camera > _camera)
draw the current life of the element
virtual bool needToRemove()
Request if the element might be removed from the system.
Definition: Element.hpp:113
virtual void onDestroy()
, call when the element is removed (call only one time)
Definition: Element.hpp:219
virtual void setPosition(const vec3 &_pos)
set the current position of the element
Definition: Element.hpp:190
virtual void setFireOn(int32_t _groupIdSource, int32_t _type, float _power, const vec3 &_center=vec3(0, 0, 0))
apply a fire on the element at a current power and a specific power.
bool m_fixe
is a fixed element == > used for placement of every elements
Definition: Element.hpp:195
float m_radius
Radius of the element (all element have a radius, if == 0 ==> then ghost ...
Definition: Element.hpp:205
virtual const std::string & getType() const
get the element Type description string.
ememory::SharedPtr< ege::resource::Mesh > m_mesh
Mesh of the Element (can be nullptr)
Definition: Element.hpp:68
ememory::SharedPtr< ege::resource::Mesh > getMesh()
get a pointer on the Mesh file.
Definition: Element.hpp:90
virtual void preCalculationDraw(const ege::Camera &_camera)
Can be call tu opdate the list of the element displayed on the scren (example : no display of the hid...
Definition: Element.hpp:151
virtual vec3 getPositionTheoric()
get the theoric position. Sometimes, the element has move due to an explosion or something else...
Definition: Element.hpp:178
virtual bool setMesh(ememory::SharedPtr< ege::resource::Mesh > _mesh)
set the the Mesh properties.
Definition: Element.hpp:28