19 CVector3 cArenaCenter(0.0f, 0.0f, 0.0f);
20 CVector3 cArenaSize(0.0f, 0.0f, 0.0f);
25 m_cFloorExtents = btVector3(cArenaSize.
GetX(), fHeight, cArenaSize.
GetY());
26 m_cFloorOrigin = btVector3(cArenaCenter.
GetX(), -fHeight * 0.5f, -cArenaCenter.
GetY());
28 m_cFloor.~btRigidBody();
29 m_cFloorShape.~btBoxShape();
31 new (&m_cFloorShape) btBoxShape(m_cFloorExtents * 0.5f);
32 new (&m_cFloor) btRigidBody(0,
nullptr, &m_cFloorShape);
33 m_cFloor.setUserPointer(
nullptr);
34 m_cFloor.getWorldTransform().setOrigin(m_cFloorOrigin);
46 m_cFloor.~btRigidBody();
47 m_cFloorShape.~btBoxShape();
49 new (&m_cFloorShape) btBoxShape(m_cFloorExtents * 0.5f);
50 new (&m_cFloor) btRigidBody(0,
nullptr, &m_cFloorShape);
51 m_cFloor.setUserPointer(
nullptr);
52 m_cFloor.getWorldTransform().setOrigin(m_cFloorOrigin);
70 "Michael Allwright [allsey87@gmail.com]",
72 "Inserts a floor into the 3D dynamics engine",
73 "For a description on how to use this plugin, please consult the documentation\n"
74 "for the dynamics3d physics engine plugin",
void GetNodeAttributeOrDefault(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer, const T &t_default)
Returns the value of a node's attribute, or the passed default value.
float Real
Collects all ARGoS code.
CDynamics3DEngine * m_pcEngine
Real GetX() const
Returns the x coordinate of this vector.
Real GetY() const
Returns the y coordinate of this vector.
TConfigurationNode & GetNode(TConfigurationNode &t_node, const std::string &str_tag)
Given a tree root node, returns the first of its child nodes with the wanted name.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
REGISTER_DYNAMICS3D_PLUGIN(CDynamics3DFloorPlugin,"floor","Michael Allwright [allsey87@gmail.com]","1.0","Inserts a floor into the 3D dynamics engine","For a description on how to use this plugin, please consult the documentation\n""for the dynamics3d physics engine plugin","Usable")
btMultiBodyDynamicsWorld & GetWorld()
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
virtual void Init(TConfigurationNode &t_tree)
The namespace containing all the ARGoS related code.
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.