24 #ifndef __PLAYGROUND_H
25 #define __PLAYGROUND_H
76 box->
setPose(osg::Matrix::translate(offset) *
pose);
82 box->
setPose(osg::Matrix::translate(offset) * osg::Matrix::rotate(M_PI, 0,0,1) * pose);
90 box->
setPose(osg::Matrix::translate(offset2) * osg::Matrix::rotate(M_PI/2.0, 0,0,1) * pose);
96 box->
setPose(osg::Matrix::translate(offset2) * osg::Matrix::rotate(3.0*M_PI/2.0, 0,0,1)
Data structure for accessing the ODE.
Definition: odehandle.h:44
OsgHandle osgHandle
Definition: abstractobstacle.h:174
virtual std::vector< TextureDescr > getTextures(int primitive) const
returns the textures of the given primitive
Definition: abstractobstacle.cpp:147
bool obstacle_exists
Definition: abstractobstacle.h:171
double height
Definition: playground.h:37
OdeHandle odeHandle
Definition: abstractobstacle.h:173
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
virtual void createGround()
Definition: abstractground.cpp:123
virtual void changeGeometry(double length, double width, double height, double factorxy)
Definition: abstractground.cpp:73
Definition: primitive.h:89
virtual void create()
overload this function to create the obstactle. All primitives should go into the list "obst" ...
Definition: playground.h:66
Vec3f Vec3
Definition: osgforwarddecl.h:42
Definition: primitive.h:89
double length
Definition: playground.h:37
double width
Definition: playground.h:37
Definition: playground.h:33
std::vector< Primitive * > obst
primitives which belong to this obstacle
Definition: abstractobstacle.h:166
Box primitive.
Definition: primitive.h:267
double factorlength2
Definition: playground.h:38
virtual void setTextures(const std::vector< TextureDescr > &textures)
assign a set of texture to the surfaces of the primitive
Definition: primitive.cpp:142
osg::Matrix pose
Definition: abstractobstacle.h:170
Playground(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const osg::Vec3 &dimension=osg::Vec3(7.0, 0.2, 0.5), double factorxy=1, bool createGround=true)
Definition: playground.h:42
virtual void setPose(const Pose &pose)
set the pose of the primitive
Definition: primitive.cpp:156
Definition: abstractground.h:36
virtual void destroy()
is called to destroy the object. The default implementation is to delete all primitives in "obst"...
Definition: abstractobstacle.cpp:171
virtual void changeGeometry(double length, double width, double height, double factorxy)
Definition: playground.h:53
virtual void init(const OdeHandle &odeHandle, double mass, const OsgHandle &osgHandle, char mode=Body|Geom|Draw)
registers primitive in ODE and OSG.
Definition: primitive.cpp:417