[DEV] add physic interface
This commit is contained in:
parent
673a7fbade
commit
1cc5144acc
@ -35,7 +35,7 @@ namespace ege {
|
|||||||
* @brief set the position of the camera.
|
* @brief set the position of the camera.
|
||||||
* @param[in] pos Position of the camera.
|
* @param[in] pos Position of the camera.
|
||||||
*/
|
*/
|
||||||
void setEye(const vec3& _eye);
|
virtual void setEye(const vec3& _eye);
|
||||||
/**
|
/**
|
||||||
* @brief get the curent Camera Eye position.
|
* @brief get the curent Camera Eye position.
|
||||||
* @return the current position.
|
* @return the current position.
|
||||||
@ -50,7 +50,7 @@ namespace ege {
|
|||||||
* @brief set a new Camera target position.
|
* @brief set a new Camera target position.
|
||||||
* @param[in] _target New camera target position.
|
* @param[in] _target New camera target position.
|
||||||
*/
|
*/
|
||||||
void setTarget(const vec3& _target);
|
virtual void setTarget(const vec3& _target);
|
||||||
/**
|
/**
|
||||||
* @brief Get the curent Camera target position.
|
* @brief Get the curent Camera target position.
|
||||||
* @return The target position.
|
* @return The target position.
|
||||||
@ -65,7 +65,7 @@ namespace ege {
|
|||||||
* @brief Set the camera angle.
|
* @brief Set the camera angle.
|
||||||
* @param[in] _angle camera angle.
|
* @param[in] _angle camera angle.
|
||||||
*/
|
*/
|
||||||
void setAngle(float _angle);
|
virtual void setAngle(float _angle);
|
||||||
/**
|
/**
|
||||||
* @brief Get the camera angle.
|
* @brief Get the camera angle.
|
||||||
* @return the up camera angle.
|
* @return the up camera angle.
|
||||||
|
@ -452,7 +452,13 @@ void ege::ElementPhysic::setAngularVelocity(const vec3& _value) {
|
|||||||
m_body->setAngularVelocity(_value);
|
m_body->setAngularVelocity(_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btQuaternion ege::ElementPhysic::getOrientation() const {
|
||||||
|
if (m_body == nullptr) {
|
||||||
|
EGE_WARNING("no body");
|
||||||
|
return btQuaternion(0,0,0,0);
|
||||||
|
}
|
||||||
|
return m_body->getOrientation();
|
||||||
|
}
|
||||||
void ege::ElementPhysic::setCollisionDetectionStatus(bool _status) {
|
void ege::ElementPhysic::setCollisionDetectionStatus(bool _status) {
|
||||||
if (m_body == nullptr) {
|
if (m_body == nullptr) {
|
||||||
EGE_WARNING("no body");
|
EGE_WARNING("no body");
|
||||||
|
@ -125,7 +125,7 @@ namespace ege {
|
|||||||
virtual void setTorqueImpulse(const vec3& _value);
|
virtual void setTorqueImpulse(const vec3& _value);
|
||||||
virtual void setAngularVelocity(const vec3& _value);
|
virtual void setAngularVelocity(const vec3& _value);
|
||||||
|
|
||||||
|
btQuaternion getOrientation() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_elementInPhysicsSystem;
|
bool m_elementInPhysicsSystem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user