29 #ifndef ICUBSIMULATION_WORLD_INC
30 #define ICUBSIMULATION_WORLD_INC
33 #include "SDL_opengl.h"
43 #pragma warning(disable:4244 4305)
76 if (
counter==NULL)
return false;
79 result.
setFail(
"location not set");
85 result.
setFail(
"too many objects");
89 if (!obj.
create(op,result,at))
return false;
117 return index>=0 && index<(*counter);
121 for (
int i=0; i<*
counter; i++) {
124 dGeomDestroy(
get(i).getGeometry());
197 #define numObjJoints 5
303 void setPosition(dReal agent1X, dReal agent1Z, dReal agent1Y );
305 void init( dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z,
312 worldSim(dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z,
WorldObjectListOf(T *store, int len, int &counter, real3 *colors)
virtual const WorldObject & get(int index) const
virtual WorldObject & get(int index)
virtual bool create(const WorldOp &op, WorldResult &result)
virtual const WorldObject & get(int index) const =0
bool inRange(int index) const
virtual WorldObject & get(int index)=0
WorldObjectList(int len, int &counter, real3 *colors)
virtual dGeomID getGeometry() const =0
virtual bool create(const WorldOp &op, WorldResult &result, int idx)=0
virtual dBodyID getBody() const =0
double get(int offset) const
void setFail(const char *msg)
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
virtual dGeomID getGeometry() const
virtual dBodyID getBody() const
virtual dGeomID getGeometry() const
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
virtual dBodyID getBody() const
virtual dGeomID getGeometry() const
virtual dBodyID getBody() const
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
virtual dBodyID getBody() const
virtual dGeomID getGeometry() const
dTriMeshDataID s_TriData[100]
WorldObjectListOf< MyObject > box_dynamic
WorldObjectListOf< MyObject3 > sphere_static
void loadTexture(std::string texture, int numTexture)
dTriMeshDataID TriData[100]
WorldObjectListOf< MyObject2 > model_dynamic
WorldObjectListOf< MyObject3 > sphere_dynamic
MyObject1 cyl_obj[MAXNUM]
void setPosition(dReal agent1X, dReal agent1Z, dReal agent1Y)
dJointID joint[numObjJoints]
dReal speed[numObjJoints]
MyObject2 ThreeD_obj[100]
void drawGeom(dGeomID g, const dReal *pos, const dReal *rot)
MyObject1 s_cyl_obj[MAXNUM]
WorldObjectListOf< MyObject1 > cylinder_static
worldSim(dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z, RobotConfig &config)
void activateWorld(RobotConfig &config)
static const bool textured
MyObject2 s_ThreeD_obj[100]
WorldObjectListOf< MyObject > box_static
WorldObjectListOf< MyObject1 > cylinder_dynamic
void init(dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z, RobotConfig &config)
WorldObjectListOf< MyObject2 > model_static
static uint32_t idx[BOARD_NUM]
Header file for the rendering.