OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
osg::OMGeometry< Mesh > Class Template Reference

#include <OMGeometry.h>

Inheritance diagram for osg::OMGeometry< Mesh >:

Public Types

typedef unsigned char AttributeBinding
 

Public Member Functions

 OMGeometry (Mesh mesh, AttributeBinding binding=NORMAL_PER_FACE|COLOR_PER_VERTEX, Vec4 &defaultColor=Vec4(0.5, 0.5, 0.5, 1.0))
 
bool isLoadedOk ()
 

Static Public Attributes

static const AttributeBinding NORMAL_NONE = 1
 
static const AttributeBinding NORMAL_PER_VERTEX = 2
 
static const AttributeBinding NORMAL_PER_FACE = 4
 
static const AttributeBinding COLOR_NONE = 8
 
static const AttributeBinding COLOR_PER_VERTEX = 16
 
static const AttributeBinding COLOR_PER_FACE = 32
 

Detailed Description

template<class Mesh>
class osg::OMGeometry< Mesh >

Class representing an interface between OpenMesh and OSG It's inherited from standart osg::Geometry, co it's easy to add mesh geometry into any osg node

Member Typedef Documentation

template<class Mesh >
typedef unsigned char osg::OMGeometry< Mesh >::AttributeBinding

Typedef for specifiing additional model attributes

Constructor & Destructor Documentation

template<class Mesh >
OMGeometry::OMGeometry ( Mesh  mesh,
AttributeBinding  binding = NORMAL_PER_FACE | COLOR_PER_VERTEX,
Vec4 &  defaultColor = Vec4(0.5, 0.5, 0.5, 1.0) 
)

Constructor - creates an instance of Geometry from an OpenMesh mesh

Parameters
meshOpenMesh mesh to be converted
bindingSpecifies additional attributes for mesh generation normal binding and color binding. If there is no normal in Mesh, they will be computed
defaultColorSpecifies default color which will be added, if there is no color attribute in Mesh
See Also
AttributeBinding

Member Function Documentation

template<class Mesh >
bool OMGeometry::isLoadedOk ( )

Allows testing if geometry was successfully loaded

Returns
True, if all the model was loaded successfully.

Member Data Documentation

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::COLOR_NONE = 8
static

Color will not be specified in osg

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::COLOR_PER_FACE = 32
static

Color will be bound per face If there is no color associated with faces, a default color will be added

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::COLOR_PER_VERTEX = 16
static

Color will be bound per vertex If there is no color associated with vertices, a default color will be added

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::NORMAL_NONE = 1
static

Normals will be not added into osg

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::NORMAL_PER_FACE = 4
static

Normals will be bound per face If there is no normal associated with faces, they will be computed

template<class Mesh >
const AttributeBinding osg::OMGeometry< Mesh >::NORMAL_PER_VERTEX = 2
static

Normals will be bound per vertex If there is no normal associated with vertices, they will be computed


The documentation for this class was generated from the following files: