In creation of a hexapod:
// create body
double twidth = conf.size * conf.width ;// 1/1.5;
double theight = conf.size * conf.height; // 1/4;
trunk = new Box(conf.size, twidth, theight);
// trunk = new Capsule(twidth,conf.size);
trunk->setTexture(trunkTex);
trunk->init(odeHandle, conf.mass*conf.percentageBodyMass, osgHandle);
// @param pos struct Position with desired position
/*
@param pose position and orientation of sensor (e.g. camera) wrt.
the primitive that is given at init()
*/
osg::Matrix trunkPos = TRANSM(0,0,conf.legLength)*pose;
trunk->setPose(trunkPos);
objects.push_back(trunk);
fot every creation of robot:
object[0] is the main body (in hexapod case it is a trunk using Box shape)