25 cpVect tVertices[] = {
26 cpv(-cHalfSize.
GetX(), -cHalfSize.
GetY()),
27 cpv(-cHalfSize.
GetX(), cHalfSize.
GetY()),
28 cpv( cHalfSize.
GetX(), cHalfSize.
GetY()),
29 cpv( cHalfSize.
GetX(), -cHalfSize.
GetY())
49 ptBody->p = cpv(cPosition.
GetX(), cPosition.
GetY());
50 cpBodySetAngle(ptBody, cZAngle.
GetValue());
54 cpPolyShapeNew(ptBody,
72 ptBody = cpBodyNewStatic();
73 ptBody->p = cpv(cPosition.
GetX(), cPosition.
GetY());
74 cpBodySetAngle(ptBody, cZAngle.
GetValue());
78 cpPolyShapeNew(ptBody,
100 cpVect tVertices[] = {
101 cpv(-cHalfSize.
GetX(), -cHalfSize.
GetY()),
102 cpv(-cHalfSize.
GetX(), cHalfSize.
GetY()),
103 cpv( cHalfSize.
GetX(), cHalfSize.
GetY()),
104 cpv( cHalfSize.
GetX(), -cHalfSize.
GetY())
The namespace containing all the ARGoS related code.
REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY(CEPuckEntity, CDynamics2DEPuckModel)
const SAnchor & GetOriginAnchor() const
Returns a const reference to the origin anchor associated to this entity.
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
CVector3 Position
The position of the anchor wrt the global coordinate system.
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
It defines the basic type CRadians, used to store an angle value in radians.
Real GetValue() const
Returns the value in radians.
void ToEulerAngles(CRadians &c_z_angle, CRadians &c_y_angle, CRadians &c_x_angle) const
Real GetX() const
Returns the x coordinate of this vector.
Real GetY() const
Returns the y coordinate of this vector.
Real GetZ() const
Returns the z coordinate of this vector.
const CVector3 & GetSize() const
void Resize(const CVector3 &c_size)
CDynamics2DBoxModel(CDynamics2DEngine &c_engine, CBoxEntity &c_entity)
cpFloat GetBoxAngularFriction() const
cpFloat GetBoxLinearFriction() const
CDynamics2DEngine & GetDynamics2DEngine()
Returns the dynamics 2D engine state.
cpBody * GetBody()
Returns the body as non-const pointer.
virtual void SetBody(cpBody *pt_body, Real f_height)
Sets the body and registers the default origin anchor method.
A stretchable and grippable object model for the dynamics 2D engine.
void SetLinearFriction(Real f_max_bias, Real f_max_force)
Sets the linear friction of this object.
void SetGrippable(CDynamics2DGrippable *pc_grippable)
void SetMass(Real f_mass)
CDynamics2DGrippable * GetGrippable()
void SetAngularFriction(Real f_max_bias, Real f_max_force)
Sets the angular friction of this object.