2 #include <argos3/core/simulator/entity/composable_entity.h>
19 bool bIsStatic = cpBodyIsStatic(m_ptBody);
21 cpShape* ptCurShape = m_ptBody->shapeList;
24 ptNextShape = ptCurShape->next;
26 cpShapeFree(ptCurShape);
27 ptCurShape = ptNextShape;
43 m_ptBody->p = cpv(c_position.
GetX(), c_position.
GetY());
46 cpBodySetAngle(m_ptBody, cZAngle.
GetValue());
48 if(cpBodyIsStatic(m_ptBody)) {
49 cpBB tBoundingBox = cpShapeGetBB(m_ptBody->shapeList);
51 tBoundingBox = cpShapeGetBB(m_ptBody->shapeList);
65 if(cpBodyIsStatic(m_ptBody))
return;
68 m_ptBody->p = cpv(cPosition.
GetX(), cPosition.
GetY());
72 cpBodySetAngle(m_ptBody, cZAngle.
GetValue());
74 m_ptBody->v = cpvzero;
76 cpBodyResetForces(m_ptBody);
86 cpBB tBoundingBox = cpShapeGetBB(m_ptBody->shapeList);
87 for(cpShape* pt_shape = m_ptBody->shapeList->next;
89 pt_shape = pt_shape->next) {
90 cpBB* ptBB = &pt_shape->bb;
91 if(ptBB->l < tBoundingBox.l) tBoundingBox.l = ptBB->l;
92 if(ptBB->b < tBoundingBox.b) tBoundingBox.b = ptBB->b;
93 if(ptBB->r > tBoundingBox.r) tBoundingBox.r = ptBB->r;
94 if(ptBB->t > tBoundingBox.t) tBoundingBox.t = ptBB->t;
107 if(!cpBodyIsStatic(m_ptBody)) {
116 for(cpShape* pt_shape = m_ptBody->shapeList;
118 pt_shape = pt_shape->next) {
119 if(cpSpaceShapeQuery(
122 pt_shape, NULL, NULL) > 0) {
136 m_ptBody->data =
this;