OSGMesh Class Reference

Graphical Mesh or arbitrary OSG model. More...

#include <osgprimitive.h>

Inherits lpzrobots::OSGPrimitive.

Collaboration diagram for OSGMesh:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 OSGMesh (const std::string &filename, float scale=1, const osgDB::ReaderWriter::Options *options=0)
 Constuctor.
 ~OSGMesh ()
virtual void init (const OsgHandle &osgHandle, Quality quality=Middle)
 Initialisation of the primitive.
virtual void virtualInit (const OsgHandle &osgHandle)
 Same as init, but the mesh file is not loaded and therefore not displayed.
virtual float getRadius ()
float getScale ()

Protected Member Functions

virtual void internInit (const OsgHandle &osgHandle, bool loadAndDisplayMesh, Quality quality=Middle)

Protected Attributes

std::string filename
float scale
const
osgDB::ReaderWriter::Options * 
options
osg::ref_ptr< osg::Node > mesh
osg::ref_ptr
< osg::MatrixTransform > 
scaletrans

Detailed Description

Graphical Mesh or arbitrary OSG model.


Constructor & Destructor Documentation

OSGMesh ( const std::string &  filename,
float  scale = 1,
const osgDB::ReaderWriter::Options *  options = 0 
)

Constuctor.

Parameters:
filename filename of the model file (search path is osg data path)
scale scale factor used for scaling the model
options for model reader
~OSGMesh (  ) 

Member Function Documentation

float getRadius (  )  [virtual]
float getScale (  )  [inline]
void init ( const OsgHandle osgHandle,
Quality  quality = Middle 
) [virtual]

Initialisation of the primitive.

Must in order to place the object into the scene. This function should be overloaded

Implements OSGPrimitive.

void internInit ( const OsgHandle osgHandle,
bool  loadAndDisplayMesh,
Quality  quality = Middle 
) [protected, virtual]
void virtualInit ( const OsgHandle osgHandle  )  [virtual]

Same as init, but the mesh file is not loaded and therefore not displayed.

This method ensures that the transform is correctly initialised.

Parameters:
osgHandle 

Member Data Documentation

std::string filename [protected]
osg::ref_ptr<osg::Node> mesh [protected]
const osgDB::ReaderWriter::Options* options [protected]
float scale [protected]
osg::ref_ptr<osg::MatrixTransform> scaletrans [protected]

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