24 #ifndef __PASSIVESPHERE_H
25 #define __PASSIVESPHERE_H
53 sphere =
new Sphere(radius);
54 obst.push_back(sphere);
63 this->pose = osg::Matrix::translate(0,0,radius) *
pose;
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
Abstract class (interface) for obstacles.
Definition: abstractobstacle.h:46
Matrixd Matrix
Definition: osgforwarddecl.h:47
bool obstacle_exists
Definition: abstractobstacle.h:171
Sphere primitive.
Definition: primitive.h:289
virtual Primitive * getMainPrimitive() const
return the "main" primitive of the obtactle. The meaning of "main" is arbitrary
Definition: passivesphere.h:70
OdeHandle odeHandle
Definition: abstractobstacle.h:173
virtual void create()
overload this function to create the obstactle. All primitives should go into the list "obst" ...
Definition: passivesphere.h:74
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:470
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
virtual void setTexture(const std::string &filename)
assigns a texture to the all primitives of this obstactle with repeat -1,-1
Definition: passivesphere.h:58
Definition: primitive.h:89
virtual OSGPrimitive * getOSGPrimitive()
returns the assoziated osg primitive if there or 0
Definition: primitive.cpp:468
Definition: primitive.h:89
PassiveSphere(const OdeHandle &odeHandle, const OsgHandle &osgHandle, double radius=0.3, double mass=1.0)
Constructor.
Definition: passivesphere.h:51
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
std::vector< Primitive * > obst
primitives which belong to this obstacle
Definition: abstractobstacle.h:166
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
virtual void setTexture(const std::string &filename)
assigns a texture to the primitive
Definition: osgprimitive.cpp:101
virtual void setPose(const Pose &pose)
set the pose of the primitive
Definition: primitive.cpp:156
(Passive) sphere as obstacle
Definition: passivesphere.h:39
virtual void setPose(const osg::Matrix &pose)
sets position of the obstacle and creates/recreates obstacle if necessary
Definition: passivesphere.h:62