#include <terrainground.h>
Inherits AbstractObstacle.
Inheritance diagram for TerrainGround:


Public Member Functions | |
| TerrainGround (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const std::string &filename, const std::string &texture, double x_size, double y_size, double height, OSGHeightField::CodingMode coding=OSGHeightField::Red) | |
| Constructor. | |
| virtual | ~TerrainGround () |
| virtual void | update () |
| updates the position of the geoms ( not nessary for static objects) | |
| 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 | |
Protected Member Functions | |
| virtual void | create () |
| overload this function to create the obstactle. All primitives should go into the list "obst" | |
| virtual void | destroy () |
| is called to destroy the object. The default implementation is to delete all primitives in "obst". | |
Protected Attributes | |
| std::string | filename |
| std::string | texture |
| HeightField * | heightfield |
| double | x_size |
| double | y_size |
| double | height |
| OSGHeightField::CodingMode | coding |
Can be loaded from image or from HeightFieldFiles
| TerrainGround | ( | const OdeHandle & | odeHandle, | |
| const OsgHandle & | osgHandle, | |||
| const std::string & | filename, | |||
| const std::string & | texture, | |||
| double | x_size, | |||
| double | y_size, | |||
| double | height, | |||
| OSGHeightField::CodingMode | coding = OSGHeightField::Red | |||
| ) |
Constructor.
| odeHandle | ||
| osgHandle | ||
| filename | name of the file to load. If ending is .ppm then it is considered as a bitmap height file. The coding mode is used to decode the heights. Otherwise it is consider to be a OSG HeightFieldFile | |
| texture | image filename for the texture | |
| x_size | size in x direction in world coordinates | |
| y_size | size in y direction in world coordinates | |
| height | height in world coordinates | |
| coding | Coding mode, see OSGHeightField (this an own class, not in OSG) |
| virtual ~TerrainGround | ( | ) | [inline, virtual] |
| void create | ( | ) | [protected, virtual] |
overload this function to create the obstactle. All primitives should go into the list "obst"
Implements AbstractObstacle.
| void destroy | ( | ) | [protected, virtual] |
is called to destroy the object. The default implementation is to delete all primitives in "obst".
Reimplemented from AbstractObstacle.
| virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
return the "main" primitive of the obtactle. The meaning of "main" is arbitrary
Implements AbstractObstacle.
| void setPose | ( | const osg::Matrix & | pose | ) | [virtual] |
sets position of the obstacle and creates/recreates obstacle if necessary
Implements AbstractObstacle.
| virtual void update | ( | ) | [inline, virtual] |
updates the position of the geoms ( not nessary for static objects)
Reimplemented from AbstractObstacle.
OSGHeightField::CodingMode coding [protected] |
std::string filename [protected] |
double height [protected] |
HeightField* heightfield [protected] |
std::string texture [protected] |
double x_size [protected] |
double y_size [protected] |
1.4.7