diff --git a/ege/camera/View.h b/ege/camera/View.h index 225ff3c..1aa21da 100644 --- a/ege/camera/View.h +++ b/ege/camera/View.h @@ -35,7 +35,7 @@ namespace ege { * @brief set the 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. * @return the current position. @@ -50,7 +50,7 @@ namespace ege { * @brief set a 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. * @return The target position. @@ -65,7 +65,7 @@ namespace ege { * @brief Set the camera angle. * @param[in] _angle camera angle. */ - void setAngle(float _angle); + virtual void setAngle(float _angle); /** * @brief Get the camera angle. * @return the up camera angle. diff --git a/ege/elements/ElementPhysic.cpp b/ege/elements/ElementPhysic.cpp index ebd45c8..0893ecc 100644 --- a/ege/elements/ElementPhysic.cpp +++ b/ege/elements/ElementPhysic.cpp @@ -452,7 +452,13 @@ void ege::ElementPhysic::setAngularVelocity(const vec3& _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) { if (m_body == nullptr) { EGE_WARNING("no body"); diff --git a/ege/elements/ElementPhysic.h b/ege/elements/ElementPhysic.h index 7f1bb49..5f85bc6 100644 --- a/ege/elements/ElementPhysic.h +++ b/ege/elements/ElementPhysic.h @@ -125,7 +125,7 @@ namespace ege { virtual void setTorqueImpulse(const vec3& _value); virtual void setAngularVelocity(const vec3& _value); - + btQuaternion getOrientation() const; protected: bool m_elementInPhysicsSystem;