24 #ifndef __RANDOMOBSTACLES_H
25 #define __RANDOMOBSTACLES_H
63 c.
area =
Pos(ground->getGroundLength()/2, ground->getGroundWidth()/2, 5)*0.95;
64 c.
pose = ground->getPose();
67 c.
pose = osg::Matrix::translate(0,0,0);
89 virtual void remove(
bool all =
false);
virtual void spawn(OType type=ORandom, SType subtype=SRandom)
Definition: randomobstacles.cpp:68
Data structure for accessing the ODE.
Definition: odehandle.h:44
OsgHandle osgHandle
Definition: abstractobstacle.h:174
int sphereRelFreq
Definition: randomobstacles.h:41
Abstract class (interface) for obstacles.
Definition: abstractobstacle.h:46
Matrixd Matrix
Definition: osgforwarddecl.h:47
SType
Definition: randomobstacles.h:57
Definition: randomobstacles.h:33
OdeHandle odeHandle
Definition: abstractobstacle.h:173
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
Definition: randomobstacles.h:56
Definition: randomobstacles.h:57
Definition: randomobstacles.h:57
int boxRelFreq
Definition: randomobstacles.h:40
Pos maxSize
Definition: randomobstacles.h:37
Definition: randomobstacles.h:56
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
virtual void setPose(const osg::Matrix &pose)
sets position of the obstacle and creates/recreates obstacle if necessary
Definition: randomobstacles.cpp:44
osg::Matrix pose
Definition: abstractobstacle.h:170
double maxDensity
Definition: randomobstacles.h:39
Definition: randomobstacles.h:57
Definition: randomobstacles.h:56
int capRelFreq
Definition: randomobstacles.h:42
Definition: randomobstacles.h:57
Pos minSize
Definition: randomobstacles.h:36
osg::Matrix pose
Definition: randomobstacles.h:35
Definition: randomobstacles.h:56
double minDensity
Definition: randomobstacles.h:38
Definition: abstractground.h:36
Pos area
zero centered, use setPose to shift around (z() component is the height)
Definition: randomobstacles.h:34
RandomObstacles(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const RandomObstaclesConf &conf=getDefaultConf())
Definition: randomobstacles.cpp:36
Passive random obstacles: with spawn and remove obstacles can be created and removed.
Definition: randomobstacles.h:51
static RandomObstaclesConf getDefaultConf(AbstractGround *ground=0)
creates a default configuration, optionally with the size and position of the ground ...
Definition: randomobstacles.h:60
OType
Definition: randomobstacles.h:56
Definition: randomobstacles.h:57
int c
Definition: hexapod.cpp:56
virtual Primitive * getMainPrimitive() const
return the "main" primitive of the obtactle. The meaning of "main" is arbitrary
Definition: randomobstacles.cpp:49
virtual void create()
overload this function to create the obstactle. All primitives should go into the list "obst" ...
Definition: randomobstacles.h:87