ElementPhysic.hpp
Go to the documentation of this file.
89 // virtual void drawLife(const ememory::SharedPtr<ewol::resource::Colored3DObject>& _draw, const ememory::SharedPtr<ege::Camera>& _camera);
178 virtual void drawDebug(ememory::SharedPtr<ewol::resource::Colored3DObject> _draw, ememory::SharedPtr<ege::Camera> _camera);
205 virtual void onCollisionDetected(const ememory::SharedPtr<ege::Element>& _obj, const vec3& _point, const vec3& _normal) {};
bool m_detectCollisionEnable
physic collision detect enable.
Definition: ElementPhysic.hpp:185
virtual void draw(int32_t _pass=0)
draw the curent element (can have multiple display)
virtual vec3 getPositionTheoric()
get the theoric position. Sometimes, the element has move due to an explosion or something else...
Definition: ElementPhysic.hpp:98
virtual void drawDebug(ememory::SharedPtr< ewol::resource::Colored3DObject > _draw, ememory::SharedPtr< ege::Camera > _camera)
Debug display of the current element.
btCollisionShape * getShape()
get a pointer on the bullet collision shape.
Definition: ElementPhysic.hpp:70
bool getCollisionDetectionStatus()
get collision status of the object.
Definition: ElementPhysic.hpp:191
ElementPhysic(const ememory::SharedPtr< ege::Environement > &_env, bool _autoRigidBody=true)
Constructor (when constructer is called just add element that did not change. The object will be stor...
Definition: AudioElement.hpp:8
float btScalar
btCollisionShape * m_shape
shape of the element (set a copy here to have the debug display of it)
Definition: ElementPhysic.hpp:57
virtual void onCollisionDetected(const ememory::SharedPtr< ege::Element > &_obj, const vec3 &_point, const vec3 &_normal)
when a collision is detected with an other object (just after calculate data update ...
Definition: ElementPhysic.hpp:205
void iaEnable()
enable periodic call Of this object for processing Artificial Intelligence
void iaDisable()
disable periodic call Of this object for processing Artificial Intelligence
vec3 m_theoricPosition
draw the current life of the element
Definition: ElementPhysic.hpp:92
virtual void onDestroy()
, call when the element is removed (call only one time
Definition: ElementPhysic.hpp:175
void setCollisionDetectionStatus(bool _status=true)
Change enable status of the object.
virtual bool setMesh(ememory::SharedPtr< ege::resource::Mesh > _mesh)
set the the Mesh properties.
virtual const vec3 & getPosition()
get the current position of the element
virtual void setPositionTheoric(const vec3 &_pos)
set the current Theoric position of the element
Definition: ElementPhysic.hpp:105
Definition: ElementPhysic.hpp:31
virtual void setPosition(const vec3 &_pos)
set the current position of the element
virtual void dynamicDisable()
remove this element from the physique engine
btRigidBody * m_body
all the element have a body == > otherwise it will be not manage with this system...
Definition: ElementPhysic.hpp:35
Definition: Element.hpp:28
virtual const std::string & getType() const
get the element Type description string.
virtual void iaAction(float _step)
periodic call for intelligence artificial.
Definition: ElementPhysic.hpp:171