RandomObstacles Class Reference

Passive random obstacles: with spawn and remove obstacles can be created and removed. More...

#include <randomobstacles.h>

Inherits lpzrobots::AbstractObstacle.

Collaboration diagram for RandomObstacles:
Collaboration graph
[legend]

List of all members.

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 PrimitivegetMainPrimitive () 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

Detailed Description

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)


Member Enumeration Documentation

enum OType
Enumerator:
Box 
Sphere 
Caps 
ORandom 
enum SType
Enumerator:
Metal 
Plastic 
Rubber 
Foam 
SRandom 

Constructor & Destructor Documentation

RandomObstacles ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
const RandomObstaclesConf conf = getDefaultConf() 
)

Member Function Documentation

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.

void spawn ( OType  type = ORandom,
SType  subtype = SRandom 
) [virtual]

The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:43 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3