OMToolkit
1.0
The polygonal mesh processing tool.
|
#include <OMGeometry.h>
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 |
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
typedef unsigned char osg::OMGeometry< Mesh >::AttributeBinding |
Typedef for specifiing additional model attributes
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
mesh | OpenMesh mesh to be converted |
binding | Specifies additional attributes for mesh generation normal binding and color binding. If there is no normal in Mesh, they will be computed |
defaultColor | Specifies default color which will be added, if there is no color attribute in Mesh |
bool OMGeometry::isLoadedOk | ( | ) |
Allows testing if geometry was successfully loaded
|
static |
Color will not be specified in osg
|
static |
Color will be bound per face If there is no color associated with faces, a default color will be added
|
static |
Color will be bound per vertex If there is no color associated with vertices, a default color will be added
|
static |
Normals will be not added into osg
|
static |
Normals will be bound per face If there is no normal associated with faces, they will be computed
|
static |
Normals will be bound per vertex If there is no normal associated with vertices, they will be computed