9 #include <argos3/plugins/simulator/entities/box_entity.h>
10 #include <argos3/plugins/simulator/physics_engines/dynamics3d/dynamics3d_engine.h>
11 #include <argos3/plugins/simulator/physics_engines/dynamics3d/dynamics3d_single_body_object_model.h>
12 #include <argos3/plugins/simulator/physics_engines/dynamics3d/dynamics3d_shape_manager.h>
24 std::shared_ptr<btCollisionShape> ptrShape =
34 const btTransform& cStartTransform = btTransform(
35 btQuaternion(cOrientation.
GetX(),
39 btVector3(cPosition.
GetX(),
43 const btTransform& cCenterOfMassOffset = btTransform(
44 btQuaternion(0.0f, 0.0f, 0.0f, 1.0f),
45 btVector3(0.0f, -c_box.
GetSize().
GetZ() * 0.5f, 0.0f));
48 btVector3 cInertia(0.0f, 0.0f, 0.0f);
52 ptrShape->calculateLocalInertia(fMass, cInertia);
60 CBody::SData(cStartTransform,
CDynamics3DEngine & GetEngine()
float Real
Collects all ARGoS code.
Real GetX() const
Returns the x coordinate of this vector.
Real GetY() const
Returns the y coordinate of this vector.
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
std::vector< CAbstractBody * > m_vecBodies
An anchor related to the body of an entity.
CEmbodiedEntity & GetEmbodiedEntity()
btScalar GetDefaultFriction() const
virtual ~CDynamics3DBoxModel()
REGISTER_STANDARD_DYNAMICS3D_OPERATIONS_ON_ENTITY(CPrototypeEntity, CDynamics3DPrototypeModel)
CVector3 Position
The position of the anchor wrt the global coordinate system.
virtual void UpdateEntityStatus()
Updates the status of the associated entity.
CDynamics3DBoxModel(CDynamics3DEngine &c_engine, CBoxEntity &c_box)
bool IsMovable() const
Returns true if the entity is movable.
const CVector3 & GetSize() const
The namespace containing all the ARGoS related code.
Real GetZ() const
Returns the z coordinate of this vector.
const SAnchor & GetOriginAnchor() const
Returns a const reference to the origin anchor associated to this entity.
static std::shared_ptr< btCollisionShape > RequestBox(const btVector3 &c_half_extents)