Passive random obstacles: with spawn and remove obstacles can be created and removed. More...
#include <randomobstacles.h>
Inherits lpzrobots::AbstractObstacle.

Public Types | |
| enum | OType { Box, Sphere, Caps, ORandom } |
| enum | SType { Metal, Plastic, Rubber, Foam, SRandom } |
Public Member Functions | |
| RandomObstacles (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const RandomObstaclesConf &conf=getDefaultConf()) | |
| virtual void | setPose (const osg::Matrix &pose) |
| sets position of the obstacle and creates/recreates obstacle if necessary | |
| virtual Primitive * | getMainPrimitive () const |
| return the "main" primitive of the obtactle. The meaning of "main" is arbitrary | |
| virtual void | create () |
| overload this function to create the obstactle. All primitives should go into the list "obst" | |
| virtual void | remove (bool all=false) |
| virtual void | spawn (OType type=ORandom, SType subtype=SRandom) |
Static Public Member Functions | |
| static RandomObstaclesConf | getDefaultConf (AbstractGround *ground=0) |
| creates a default configuration, optionally with the size and position of the ground | |
Passive random obstacles: with spawn and remove obstacles can be created and removed.
Add an instance to global.obstacles to customize the creation otherwise a default version is used (though dependend on the playground)
| enum OType |
| enum SType |
| RandomObstacles | ( | const OdeHandle & | odeHandle, | |
| const OsgHandle & | osgHandle, | |||
| const RandomObstaclesConf & | conf = getDefaultConf() | |||
| ) |
| virtual void create | ( | ) | [inline, virtual] |
overload this function to create the obstactle. All primitives should go into the list "obst"
Implements AbstractObstacle.
| static RandomObstaclesConf getDefaultConf | ( | AbstractGround * | ground = 0 |
) | [inline, static] |
creates a default configuration, optionally with the size and position of the ground
| Primitive * getMainPrimitive | ( | ) | const [virtual] |
return the "main" primitive of the obtactle. The meaning of "main" is arbitrary
Implements AbstractObstacle.
| void remove | ( | bool | all = false |
) | [virtual] |
| void setPose | ( | const osg::Matrix & | pose | ) | [virtual] |
sets position of the obstacle and creates/recreates obstacle if necessary
Implements AbstractObstacle.
1.6.3