/** @file * @author Edouard DUPIN * @copyright 2011, Edouard DUPIN, all right reserved * @license MPL v2.0 (see license file) */ #pragma once #include #include #include #include #include #include namespace ege { class Environement; namespace physics { class Engine; class Component : public ege::Component { public: esignal::Signal signalPosition; protected: ememory::SharedPtr m_engine; rp3d::RigidBody* m_rigidBody; public: /** * @brief Create a basic position component (no orientation and position (0,0,0)) */ Component(ememory::SharedPtr _env); /** * @brief Create a basic position component * @param[in] _transform transformation of the position */ Component(ememory::SharedPtr _env, const etk::Transform3D& _transform); ~Component(); public: virtual const std::string& getType() const; /** * @brief set a new transformation * @param[in] _transform transformation of the position */ void setTransform(const etk::Transform3D& _transform); /** * @brief set a new transformation * @return Transformation of the position */ etk::Transform3D getTransform() const; protected: std::vector> m_shape; //!< collision shape module ... (independent of bullet lib) public: const std::vector>& getShape() const; void setShape(const std::vector>& _prop); void addShape(const ememory::SharedPtr& _shape); void generate(); }; } }