From 93d3e62b8e4a9dd066235f15af4b6ba22f2de235 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 3 Jan 2013 21:03:23 +0100 Subject: [PATCH] [DEV] Simplify the Game engine --- external/etk | 2 +- sources/ewol/game/Bounding.cpp | 35 ------------ sources/ewol/game/Bounding.h | 72 ------------------------- sources/ewol/game/BoundingAABB.cpp | 74 +++++++++++++------------ sources/ewol/game/BoundingAABB.h | 34 ++++++++---- sources/ewol/game/BoundingOBB.cpp | 30 ----------- sources/ewol/game/BoundingOBB.h | 41 -------------- sources/ewol/game/BoundingPlane.cpp | 30 ----------- sources/ewol/game/BoundingPlane.h | 39 -------------- sources/ewol/game/BoundingSphere.cpp | 31 ----------- sources/ewol/game/BoundingSphere.h | 40 -------------- sources/ewol/game/Element.cpp | 19 ++----- sources/ewol/game/Element.h | 19 +++---- sources/ewol/game/Engine.cpp | 32 ++++------- sources/ewol/game/Geometry.cpp | 80 ---------------------------- sources/ewol/game/Geometry.h | 57 -------------------- sources/file.mk | 5 -- 17 files changed, 83 insertions(+), 557 deletions(-) delete mode 100644 sources/ewol/game/Bounding.cpp delete mode 100644 sources/ewol/game/Bounding.h delete mode 100644 sources/ewol/game/BoundingOBB.cpp delete mode 100644 sources/ewol/game/BoundingOBB.h delete mode 100644 sources/ewol/game/BoundingPlane.cpp delete mode 100644 sources/ewol/game/BoundingPlane.h delete mode 100644 sources/ewol/game/BoundingSphere.cpp delete mode 100644 sources/ewol/game/BoundingSphere.h delete mode 100644 sources/ewol/game/Geometry.cpp delete mode 100644 sources/ewol/game/Geometry.h diff --git a/external/etk b/external/etk index ba9e2fca..3b5aa7b8 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit ba9e2fca7bece1f46eac6f29c0ca5e2c54f59d89 +Subproject commit 3b5aa7b84f5f41c72eccf3c2fecb6f8404401e9b diff --git a/sources/ewol/game/Bounding.cpp b/sources/ewol/game/Bounding.cpp deleted file mode 100644 index 33cfb958..00000000 --- a/sources/ewol/game/Bounding.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - - -game::Bounding::Bounding(boundingMode mode) : - m_mode(mode), - m_hasContact(false) -{ - -} - -game::Bounding::~Bounding(void) -{ - -} - - -game::Bounding* game::CreateBounding(game::boundingMode mode) -{ - switch(mode) { - case game::BoundingModeAABB: - - return new game::BoundingAABB(); - default: - return NULL; - } -} diff --git a/sources/ewol/game/Bounding.h b/sources/ewol/game/Bounding.h deleted file mode 100644 index 0413fb12..00000000 --- a/sources/ewol/game/Bounding.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __GAME_BOUNDING_H__ -#define __GAME_BOUNDING_H__ - -#include -#include -#include -//#include - -namespace game -{ - typedef enum { - BoundingModePlane, //!< plane Bounding. - BoundingModeSphere, //!< Sphere. - BoundingModeAABB, //!< Anti-aligned Bounding Boxes. - BoundingModeOBB, //!< Oriented Bounding Box. - // TODO : Add more if needed to implement - } boundingMode; - - class Bounding - { - protected: - boundingMode m_mode; //!< bounding mode of this system. - bool m_hasContact; //!< this bounding is on contact with something else ... - public: - /** - * @biref Main constructor. - * @param[in] mode Bounding mode. - */ - Bounding(boundingMode mode); - /** - * @biref Main constructor. - */ - virtual ~Bounding(void); - /** - * @brief Get the bounding type - * @return the bounding type; - */ - boundingMode GetType(void) { return m_mode; }; - /** - * @brief Update Bounding properties. - */ - virtual void Update(game::MeshObject& object, mat4& transformMatrix) {}; - /** - * @brief Draw the bounding ==> for test ... - */ - virtual void Draw(void) {}; - /** - * @brief Detect the colision positions. - */ - //virtual void GenerateContact(game::Element* ourElement, game::Bounding* otherbounding, game::Element* otherElements, etk::Vector& contactList); - virtual bool HasContact(game::Bounding& otherbounding) { return false; }; - /** - * @brief Set the contact property at a specific value ... - */ - void SetContactMode(bool newStatus) { m_hasContact=newStatus; }; - - bool GetContactStatus(void) { return m_hasContact; }; - }; - - Bounding* CreateBounding(boundingMode mode); - -}; - -#endif diff --git a/sources/ewol/game/BoundingAABB.cpp b/sources/ewol/game/BoundingAABB.cpp index ef671efd..a3035e6e 100644 --- a/sources/ewol/game/BoundingAABB.cpp +++ b/sources/ewol/game/BoundingAABB.cpp @@ -13,9 +13,10 @@ game::BoundingAABB::BoundingAABB(void) : - Bounding(game::BoundingModeAABB), - m_PointStart(-1,-1,-1), - m_PointStop(1,1,1) + m_hasContact(false), + m_center(0,0,0), + m_size(1,1,1), + m_oldUserPosition(0,0,0) { #ifdef DEBUG if (false == ewol::resource::Keep(m_displayBounding) ) { @@ -36,37 +37,46 @@ game::BoundingAABB::~BoundingAABB(void) } -void game::BoundingAABB::Update(game::MeshObject& object, mat4& transformMatrix) +void game::BoundingAABB::Update(game::MeshObject& object, mat4& rotation, vec3& position, vec3& scale) { + vec3 pointStart; + vec3 pointStop; + mat4 transformMatrix = etk::matTranslate(position) + * etk::matScale(scale) + * rotation; for (int32_t iii=0; iii point.x) { - m_PointStart.x = point.x; - } else if (m_PointStop.x < point.x) { - m_PointStop.x = point.x; + if (pointStart.x > point.x) { + pointStart.x = point.x; + } else if (pointStop.x < point.x) { + pointStop.x = point.x; } - if (m_PointStart.y > point.y) { - m_PointStart.y = point.y; - } else if (m_PointStop.y < point.y) { - m_PointStop.y = point.y; + if (pointStart.y > point.y) { + pointStart.y = point.y; + } else if (pointStop.y < point.y) { + pointStop.y = point.y; } - if (m_PointStart.z > point.z) { - m_PointStart.z = point.z; - } else if (m_PointStop.z < point.z) { - m_PointStop.z = point.z; + if (pointStart.z > point.z) { + pointStart.z = point.z; + } else if (pointStop.z < point.z) { + pointStop.z = point.z; } } } + m_size = (pointStop - pointStart) / 2; + m_center = pointStop - m_size; + m_oldUserPosition = position; + #ifdef DEBUG vec3 tmpBB(0.001,0.001,0.001); - vec3 tmpStart = m_PointStart - tmpBB; - vec3 tmpStop = m_PointStop + tmpBB; + vec3 tmpStart = pointStart - tmpBB; + vec3 tmpStop = pointStop + tmpBB; // (start) X / Y vec3 tmpPos = tmpStart; m_vertices[0] = tmpStart; @@ -167,26 +177,14 @@ void game::BoundingAABB::Draw(void) } -bool game::BoundingAABB::HasContact(game::Bounding& otherbounding) +bool game::BoundingAABB::HasContact(game::BoundingAABB& obj) { - switch(otherbounding.GetType()) { - case game::BoundingModeAABB: - { - game::BoundingAABB& other = static_cast(otherbounding); - if( m_PointStart.x > other.m_PointStop.x - || m_PointStop.x < other.m_PointStart.x - || m_PointStart.y > other.m_PointStop.y - || m_PointStop.y < other.m_PointStart.y - || m_PointStart.z > other.m_PointStop.z - || m_PointStop.z < other.m_PointStart.z) { - return false; - } - return true; - } - default: - EWOL_DEBUG("TODO ... "); - return false; + if( (abs(m_center.x-obj.m_center.x) > m_size.x+obj.m_size.x) + || (abs(m_center.y-obj.m_center.y) > m_size.y+obj.m_size.y) + || (abs(m_center.z-obj.m_center.z) > m_size.z+obj.m_size.z) ) { + return false; } + return true; } diff --git a/sources/ewol/game/BoundingAABB.h b/sources/ewol/game/BoundingAABB.h index 51e289ed..de3ec379 100644 --- a/sources/ewol/game/BoundingAABB.h +++ b/sources/ewol/game/BoundingAABB.h @@ -9,18 +9,19 @@ #ifndef __GAME_BOUNDING_AABB_H__ #define __GAME_BOUNDING_AABB_H__ -#include "ewol/game/Bounding.h" #include "etk/math/Vector3D.h" #include "etk/math/Matrix4.h" #include "ewol/renderer/resources/Colored3DObject.h" namespace game { - class BoundingAABB : public Bounding + class BoundingAABB { private : - vec3 m_PointStart; - vec3 m_PointStop; + bool m_hasContact; //!< this bounding is on contact with something else ... + vec3 m_center; + vec3 m_size; + vec3 m_oldUserPosition; // this is due to the fact object are never centered ... #ifdef DEBUG ewol::Colored3DObject* m_displayBounding; etk::Vector m_vertices; @@ -28,19 +29,32 @@ namespace game public: /** * @biref Main constructor. - * @param[in] mode Bounding mode. */ BoundingAABB(void); /** * @biref Main constructor. */ virtual ~BoundingAABB(void); - // herited methodes - virtual void Update(game::MeshObject& object, mat4& transformMatrix); - // herited methodes + /** + * @brief Update Bounding properties. + */ + virtual void Update(game::MeshObject& object, mat4& rotation, vec3& position, vec3& scale); + /** + * @brief Draw the bounding ==> for test ... + */ virtual void Draw(void); - // herited methodes - virtual bool HasContact(game::Bounding& otherbounding); + /** + * @brief Detect the colision positions. + */ + virtual bool HasContact(game::BoundingAABB& otherbounding); + /** + * @brief Set the contact property at a specific value ... + */ + void SetContactMode(bool newStatus) { m_hasContact=newStatus; }; + /** + * @brief Get the current contact status + */ + bool GetContactStatus(void) { return m_hasContact; }; }; } diff --git a/sources/ewol/game/BoundingOBB.cpp b/sources/ewol/game/BoundingOBB.cpp deleted file mode 100644 index f51034bc..00000000 --- a/sources/ewol/game/BoundingOBB.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - - -game::BoundingOBB::BoundingOBB(game::MeshObject& object) : - Bounding(game::BoundingModeOBB) -{ - -} - -game::BoundingOBB::~BoundingOBB(void) -{ - -} - -void game::BoundingOBB::Update(game::MeshObject& object, mat4& transformMatrix) -{ - -} - - - diff --git a/sources/ewol/game/BoundingOBB.h b/sources/ewol/game/BoundingOBB.h deleted file mode 100644 index 6a5350f0..00000000 --- a/sources/ewol/game/BoundingOBB.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __GAME_BOUNDING_OBB_H__ -#define __GAME_BOUNDING_OBB_H__ - -#include "ewol/game/Bounding.h" -#include "etk/math/Vector3D.h" - -namespace game -{ - class BoundingOBB : public Bounding - { - private : - vec3 m_PointCenter; - vec3 m_radius; - vec3 m_angle; - public: - /** - * @biref Main constructor. - * @param[in] mode Bounding mode. - */ - BoundingOBB(game::MeshObject& object); - /** - * @biref Main constructor. - */ - virtual ~BoundingOBB(void); - /** - * @brief Update Bounding properties. - */ - virtual void Update(game::MeshObject& object, mat4& transformMatrix); - }; -} - - -#endif diff --git a/sources/ewol/game/BoundingPlane.cpp b/sources/ewol/game/BoundingPlane.cpp deleted file mode 100644 index 5a8224ff..00000000 --- a/sources/ewol/game/BoundingPlane.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - - -game::BoundingPlane::BoundingPlane(void) : - Bounding(game::BoundingModePlane) -{ - -} - -game::BoundingPlane::~BoundingPlane(void) -{ - -} - -void game::BoundingPlane::Update(game::MeshObject& object, mat4& transformMatrix) -{ - -} - - - diff --git a/sources/ewol/game/BoundingPlane.h b/sources/ewol/game/BoundingPlane.h deleted file mode 100644 index fb970c62..00000000 --- a/sources/ewol/game/BoundingPlane.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __GAME_BOUNDING_PLANE_H__ -#define __GAME_BOUNDING_PLANE_H__ - -#include "ewol/game/Bounding.h" -#include "etk/math/Vector3D.h" - -namespace game -{ - class BoundingPlane : public Bounding - { - private : - vec3 m_equation; - public: - /** - * @biref Main constructor. - * @param[in] mode Bounding mode. - */ - BoundingPlane(void); - /** - * @biref Main constructor. - */ - virtual ~BoundingPlane(void); - /** - * @brief Update Bounding properties. - */ - virtual void Update(game::MeshObject& object, mat4& transformMatrix); - }; -} - - -#endif diff --git a/sources/ewol/game/BoundingSphere.cpp b/sources/ewol/game/BoundingSphere.cpp deleted file mode 100644 index 901f410e..00000000 --- a/sources/ewol/game/BoundingSphere.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - - -game::BoundingSphere::BoundingSphere(void) : - Bounding(game::BoundingModeSphere) -{ - -} - -game::BoundingSphere::~BoundingSphere(void) -{ - -} - -void game::BoundingSphere::Update(game::MeshObject& object, mat4& transformMatrix) -{ - -} - - - - diff --git a/sources/ewol/game/BoundingSphere.h b/sources/ewol/game/BoundingSphere.h deleted file mode 100644 index b01c49dd..00000000 --- a/sources/ewol/game/BoundingSphere.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __GAME_BOUNDING_SPHERE_H__ -#define __GAME_BOUNDING_SPHERE_H__ - -#include "ewol/game/Bounding.h" -#include "etk/math/Vector3D.h" - -namespace game -{ - class BoundingSphere : public Bounding - { - private : - vec3 m_position; //!< Position of the center of the bounding - float m_radius; //!< Radius of the Bounding - public: - /** - * @biref Main constructor. - * @param[in] mode Bounding mode. - */ - BoundingSphere(void); - /** - * @biref Main constructor. - */ - virtual ~BoundingSphere(void); - /** - * @brief Update Bounding properties. - */ - virtual void Update(game::MeshObject& object, mat4& transformMatrix); - }; -} - - -#endif diff --git a/sources/ewol/game/Element.cpp b/sources/ewol/game/Element.cpp index 99f83c5a..369b6cf4 100644 --- a/sources/ewol/game/Element.cpp +++ b/sources/ewol/game/Element.cpp @@ -16,7 +16,6 @@ static int32_t uniqueId = 0; game::Element::Element(etk::UString meshResource) : m_resource(NULL), - m_bounding(NULL), m_matrixNeedUpdate(true), m_scale(1,1,1), m_speedMax(2000000, 2000000, 2000000), @@ -33,7 +32,6 @@ game::Element::Element(etk::UString meshResource) : m_resource = tmpObject; } uniqueId++; - m_bounding = game::CreateBounding(game::BoundingModeAABB); } game::Element::~Element(void) @@ -43,10 +41,6 @@ game::Element::~Element(void) ewol::resource::Release(tmpObject); m_resource = NULL; } - if (NULL != m_bounding) { - delete(m_bounding); - m_bounding = NULL; - } } void game::Element::Draw(void) @@ -59,10 +53,8 @@ void game::Element::Draw(void) void game::Element::DrawDebug(void) { - if (NULL != m_bounding) { - //EWOL_DEBUG("draw bounding" << m_uniqueId); - m_bounding->Draw(); - } + //EWOL_DEBUG("draw bounding" << m_uniqueId); + m_bounding.Draw(); } @@ -100,15 +92,14 @@ void game::Element::ProcessGravity(float delta, game::Gravity& gravity) void game::Element::ProcessPosition(float delta) { - if( NULL!=m_bounding - && true == m_bounding->GetContactStatus()) { + if(true == m_bounding.GetContactStatus()) { return; } vec3 m_speed0(m_speed); vec3 curentAcceleration(m_gravityForce + m_userAcceleration); m_speed += curentAcceleration*delta; - vec3 tmpPos = m_position +m_speed0*delta + curentAcceleration*delta*delta/2.0f ; - + vec3 tmpPos = m_position +m_speed*delta; + // TODO : Detect collision of other elements ... if (m_position != tmpPos) { m_position = tmpPos; m_matrixNeedUpdate = true; diff --git a/sources/ewol/game/Element.h b/sources/ewol/game/Element.h index 4cb3c31d..bc4af249 100644 --- a/sources/ewol/game/Element.h +++ b/sources/ewol/game/Element.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include namespace game { @@ -24,12 +24,11 @@ namespace game { protected: ewol::Mesh* m_resource; //!< Resource to display the element. - game::Bounding* m_bounding; //!< Bounding of this element + game::BoundingAABB m_bounding; //!< Bounding of this element private: bool m_matrixNeedUpdate; //!< the matrix need to be regenerated mat4 m_matrix; //!< generated display matrix. vec3 m_scale; //!< scale of the element. (change the size in dynamic from the loaded model) - vec3 m_displayAngle; //!< Rotate the model. mat4 m_displayRotation; //!< Associated matrix of totation associated with m_displayAngle. protected: @@ -93,7 +92,6 @@ namespace game { m_position = vec3(0,0,0); m_speed = vec3(0,0,0); - m_displayAngle = vec3(0,0,0); m_displayRotation.Identity(); m_matrix.Identity(); }; @@ -116,13 +114,12 @@ namespace game m_matrixNeedUpdate = true; } /** - * @brief Rotate the curent object + * @brief Rotate the current object * @param[in] vect rotation angle * @param[in] angleRad radian angle */ void Rotate(etk::Vector3D vect, float angleRad=0.0) { - m_displayAngle.RotateAxis(angleRad, vect); m_displayRotation = etk::matRotate(vect, angleRad) * m_displayRotation; m_matrixNeedUpdate = true; } @@ -134,10 +131,10 @@ namespace game { if (m_matrixNeedUpdate == true) { m_matrixNeedUpdate = false; - m_matrix = etk::matTranslate(m_position) * etk::matScale(m_scale) * m_displayRotation; - if (m_bounding!=NULL) { - m_bounding->Update(m_resource->m_object, m_matrix); - } + m_matrix = etk::matTranslate(m_position) + * etk::matScale(m_scale) + * m_displayRotation; + m_bounding.Update(m_resource->m_object, m_displayRotation, m_position, m_scale); } return m_matrix; }; @@ -146,7 +143,7 @@ namespace game m_speed = newSpeed; } - game::Bounding* GetBounding(void) + game::BoundingAABB& GetBounding(void) { return m_bounding; } diff --git a/sources/ewol/game/Engine.cpp b/sources/ewol/game/Engine.cpp index 0015f428..6a51e2e4 100644 --- a/sources/ewol/game/Engine.cpp +++ b/sources/ewol/game/Engine.cpp @@ -65,34 +65,20 @@ void game::Engine::ProcessCollision(float deltaTime) m_contacts.Clear(); for (int32_t iii=0; iiiGetBounding(); - if (NULL != bounding1) { - bounding1->SetContactMode(false); - } + game::BoundingAABB& bounding1 = m_elements[iii]->GetBounding(); + bounding1.SetContactMode(false); } } for (int32_t iii=0; iiiGetBounding(); - if (NULL != bounding1) { - for (int32_t jjj=iii+1; jjjGetBounding(); - if (NULL != bounding2) { - bool hasContactConfirmed = false; - if (bounding1->GetType() < bounding2->GetType()) { - //bounding2->GenerateContact(m_elements[jjj], bounding1, m_elements[iii], m_contacts); - hasContactConfirmed = bounding2->HasContact(*bounding1); - } else { - //bounding1->GenerateContact(m_elements[iii], bounding2, m_elements[jjj], m_contacts); - hasContactConfirmed = bounding1->HasContact(*bounding2); - } - if (true == hasContactConfirmed) { - bounding2->SetContactMode(true); - bounding1->SetContactMode(true); - } - } + game::BoundingAABB& bounding1 = m_elements[iii]->GetBounding(); + for (int32_t jjj=iii+1; jjjGetBounding(); + if (true == bounding2.HasContact(bounding1)) { + bounding2.SetContactMode(true); + bounding1.SetContactMode(true); } } } diff --git a/sources/ewol/game/Geometry.cpp b/sources/ewol/game/Geometry.cpp deleted file mode 100644 index c6c550dc..00000000 --- a/sources/ewol/game/Geometry.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include -#include -#include -#include -#include -#include - -game::Geometry::Geometry(game::MeshObject& object) : - m_dynamic(false), - m_object(object), - m_bounding(NULL), - m_mass(NULL) -{ - -} - -game::Geometry::~Geometry(void) -{ - -} - -void game::Geometry::SetStatic(void) -{ - m_dynamic = false; -} - -void game::Geometry::SetDynamic(void) -{ - m_dynamic = true; -} - -void game::Geometry::SetBoundingMode(game::boundingMode type) -{ - if (NULL != m_bounding) { - if (m_bounding->GetType() != type) { - delete(m_bounding); - m_bounding = NULL; - } else { - return; - } - } - /* - switch(type) - { - default: - case BoundingModeNone: - break; - case BoundingModePlane: - EWOL_TODO("Implement plane..."); - break; - case BoundingModeAABB: - m_bounding = new game::BoundingAABB(); - break; - case BoundingModeSphere: - m_bounding = new game::BoundingSphere(); - break; - case BoundingModeOBB: - m_bounding = new game::BoundingOBB(m_object, m_property); - break; - } - */ -} - -void game::Geometry::BoundingUpdate(void) -{ - if (NULL != m_bounding) { - //m_bounding->Update(m_object); - } -} - - diff --git a/sources/ewol/game/Geometry.h b/sources/ewol/game/Geometry.h deleted file mode 100644 index 02975b6e..00000000 --- a/sources/ewol/game/Geometry.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __GAME_GEOMETRY_H__ -#define __GAME_GEOMETRY_H__ - -#include -#include -#include - - -namespace game -{ - class Geometry - { - private : - bool m_dynamic; //!< Set at true if the Geometry can move or not (bounding can change) - game::MeshObject& m_object; //!< Object vertex/ normal and other properties - game::Bounding* m_bounding; //!< Bounding interface. - game::Mass* m_mass; //!< Mass properties. - public: - /** - * @brief main constructor - * @param[in] object the reference mesh object (must not be NULL) - */ - Geometry(game::MeshObject& object); - /** - * @brief main destructor - */ - ~Geometry(void); - /** - * @brief Set this object static (the bounding does not change) - */ - void SetStatic(void); - /** - * @brief Set this object Dynamic (the bounding change...) - */ - void SetDynamic(void); - /** - * @brief Set bounding type - * @param[in] type Selected bounding methode (if no set, by default it does not have one) - */ - void SetBoundingMode(game::boundingMode type); - /** - * @brief Update the bounding properties. - */ - void BoundingUpdate(void); - }; -}; - - -#endif diff --git a/sources/file.mk b/sources/file.mk index 2ba7f55f..6454509f 100644 --- a/sources/file.mk +++ b/sources/file.mk @@ -84,12 +84,7 @@ FILE_LIST+= ewol/widget/Widget.cpp \ FILE_LIST+= ewol/widget/Scene.cpp \ ewol/game/Engine.cpp \ ewol/game/Element.cpp \ - ewol/game/Bounding.cpp \ ewol/game/BoundingAABB.cpp \ - ewol/game/BoundingOBB.cpp \ - ewol/game/BoundingPlane.cpp \ - ewol/game/BoundingSphere.cpp \ - ewol/game/Geometry.cpp \ ewol/game/Gravity.cpp \ ewol/game/Camera.cpp \ ewol/game/Contact.cpp \