Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
Graphical HeightField. More...
#include <osgheightfield.h>
Public Types | |
enum | CodingMode { Red, Sum, LowMidHigh } |
height coding using in the read in bitmap. More... | |
![]() | |
enum | Quality { Low, Middle, High } |
Public Member Functions | |
OSGHeightField (osg::HeightField *heightfield, float x_size, float y_size) | |
OSGHeightField (const std::string &filename, float x_size, float y_size, float height) | |
virtual void | setMatrix (const osg::Matrix &matrix) |
Sets the transformation matrix of this object (position and orientation) More... | |
virtual void | init (const OsgHandle &osgHandle, Quality quality=Middle) |
Initialisation of the primitive. More... | |
virtual const osg::HeightField * | getHeightField () const |
![]() | |
OSGPrimitive () | |
virtual | ~OSGPrimitive () |
virtual osg::Group * | getGroup () |
returns the group object which is the root of all subcomponents of this primitive More... | |
virtual void | setTexture (const std::string &filename) |
assigns a texture to the primitive More... | |
virtual void | setTexture (const TextureDescr &texture) |
assigns a texture to the primitive, you can choose how often to repeat More... | |
virtual void | setTexture (int surface, const TextureDescr &texture) |
assigns a texture to the x-th surface of the primitive, you can choose how often to repeat More... | |
virtual void | setTextures (const std::vector< TextureDescr > &textures) |
assign a set of texture to the surfaces of the primitive More... | |
virtual std::vector< TextureDescr > | getTextures () const |
returns the list of textures More... | |
virtual void | setColor (const Color &color) |
sets the color for painting this primitive More... | |
virtual void | setColor (const std::string &color) |
sets the color using the colorschema of osgHandle More... | |
virtual Color | getColor () |
returns the current color More... | |
virtual osg::Transform * | getTransform () |
returns a osg transformation object; More... | |
virtual const OsgHandle & | getOsgHandle () |
returns the osgHandle object More... | |
Static Public Member Functions | |
static osg::HeightField * | loadFromPPM (const std::string &filename, double height, CodingMode codingMode=Red) |
loads an ppm image and returns the height field using the given coding and the height (maximal height of the heightfield) More... | |
static double | coding (CodingMode mode, const unsigned char *data) |
return the height using the given coding mode. The data pointer points to RGB data point More... | |
Protected Attributes | |
osg::HeightField * | field |
float | x_size |
float | y_size |
![]() | |
osg::ref_ptr< osg::Geode > | geode |
osg::ref_ptr < osg::MatrixTransform > | transform |
osg::ref_ptr< osg::ShapeDrawable > | shape |
std::vector< TextureDescr > | textures |
OsgHandle | osgHandle |
Additional Inherited Members | |
![]() | |
virtual void | applyTextures () |
this actually sets the textures More... | |
Graphical HeightField.
enum CodingMode |
OSGHeightField | ( | osg::HeightField * | heightfield, |
float | x_size, | ||
float | y_size | ||
) |
OSGHeightField | ( | const std::string & | filename, |
float | x_size, | ||
float | y_size, | ||
float | height | ||
) |
|
static |
return the height using the given coding mode. The data pointer points to RGB data point
|
inlinevirtual |
Initialisation of the primitive.
Must in order to place the object into the scene. This function should be overloaded
Implements OSGPrimitive.
|
static |
loads an ppm image and returns the height field using the given coding and the height (maximal height of the heightfield)
|
virtual |
Sets the transformation matrix of this object (position and orientation)
Reimplemented from OSGPrimitive.
|
protected |
|
protected |
|
protected |