Go to the documentation of this file.
29 #ifndef ICUBSIMULATION_WORLD_INC
30 #define ICUBSIMULATION_WORLD_INC
33 #include "SDL_opengl.h"
40 #define DENSITY (1.0) // density of all objects
43 #pragma warning(disable:4244 4305) // for VC++, no precision loss complaints
48 virtual dBodyID
getBody()
const = 0;
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());
154 #define GPB 3// maximum number of geometries per body
197 #define numObjJoints 5 //define Joints
302 void drawGeom(dGeomID g,
const dReal *
pos,
const dReal *rot);
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,
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
MyObject1 s_cyl_obj[MAXNUM]
WorldObjectListOf< MyObject > box_static
void activateWorld(RobotConfig &config)
void init(dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z, RobotConfig &config)
bool inRange(int index) const
WorldObjectListOf< MyObject1 > cylinder_dynamic
virtual dBodyID getBody() const
virtual const WorldObject & get(int index) const
Header file for the rendering.
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
WorldObjectList(int len, int &counter, real3 *colors)
dTriMeshDataID s_TriData[100]
virtual dBodyID getBody() const =0
worldSim(dWorldID world, dSpaceID space, dReal X, dReal Y, dReal Z, RobotConfig &config)
void drawGeom(dGeomID g, const dReal *pos, const dReal *rot)
virtual dGeomID getGeometry() const
virtual dBodyID getBody() const
WorldObjectListOf< MyObject2 > model_static
virtual dBodyID getBody() const
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
double get(int offset) const
WorldObjectListOf< MyObject3 > sphere_static
MyObject1 cyl_obj[MAXNUM]
virtual bool create(const WorldOp &op, WorldResult &result, int idx)
WorldObjectListOf< MyObject > box_dynamic
virtual dGeomID getGeometry() const
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}") include_directories($
WorldObjectListOf< MyObject3 > sphere_dynamic
void setPosition(dReal agent1X, dReal agent1Z, dReal agent1Y)
WorldObjectListOf< MyObject1 > cylinder_static
virtual dBodyID getBody() const
dJointID joint[numObjJoints]
dTriMeshDataID TriData[100]
static const bool textured
MyObject2 ThreeD_obj[100]
void loadTexture(std::string texture, int numTexture)
virtual dGeomID getGeometry() const =0
virtual dGeomID getGeometry() const
WorldObjectListOf(T *store, int len, int &counter, real3 *colors)
WorldObjectListOf< MyObject2 > model_dynamic
virtual WorldObject & get(int index)
dReal speed[numObjJoints]
void setFail(const char *msg)
static uint32_t idx[BOARD_NUM]
virtual bool create(const WorldOp &op, WorldResult &result)
MyObject2 s_ThreeD_obj[100]
virtual dGeomID getGeometry() const
virtual bool create(const WorldOp &op, WorldResult &result, int idx)=0
virtual WorldObject & get(int index)=0