14#ifndef OSGUTIL_Tessellator
15#define OSGUTIL_Tessellator
114 typedef std::vector< osg::ref_ptr<Prim> >
PrimList;
144 GLfloat weight[4],
void** outData,
#define GLU_TESS_WINDING_NONZERO
Definition GLU:156
#define GLU_TESS_WINDING_POSITIVE
Definition GLU:157
#define GLU_TESS_WINDING_NEGATIVE
Definition GLU:158
#define GLU_TESS_WINDING_ODD
Definition GLU:155
#define GLU_TESS_WINDING_ABS_GEQ_TWO
Definition GLU:159
#define CALLBACK
Definition Tessellator:27
TemplateArray< Vec3, Array::Vec3ArrayType, 3, GL_FLOAT > Vec3Array
Definition Array:449
Vec3f Vec3
Definition Vec3:21
The osgUtil library provides general purpose utility classes such as update, cull and draw traverses,...
Definition NodeVisitor:25
std::vector< ref_ptr< PrimitiveSet > > PrimitiveSetList
Definition Geometry:102
Definition PrimitiveSet:125
Base class for providing reference counted objects.
Definition Referenced:44
TessellationType _ttype
tessellation rule, which parts will become solid
Definition Tessellator:229
std::vector< Vec3d * > Vec3dList
Definition Tessellator:216
osg::Vec3 tessNormal
the gluTessNormal for tessellation hint
Definition Tessellator:243
osg::Geometry::PrimitiveSetList _Contours
List of primitives that define the contours.
Definition Tessellator:237
TessellationType getTessellationType()
Definition Tessellator:70
bool getBoundaryOnly()
Definition Tessellator:62
void error(GLenum errorCode)
WindingType getWindingType()
Definition Tessellator:66
void setTessellationNormal(const osg::Vec3 norm)
Define the normal to the tessellated polygon - this provides a hint how to tessellate the contours; s...
Definition Tessellator:85
osg::Geometry::PrimitiveSetList getContours()
Definition Tessellator:87
unsigned int _numberVerts
number of vertices that are part of the 'original' set of contours
Definition Tessellator:234
virtual void beginTessellation()
Vec3dList _coordData
Definition Tessellator:221
void combine(osg::Vec3 *vertex, void *vertex_data[4], GLfloat weight[4])
void reduceArray(osg::Array *cold, const unsigned int nnu)
remove unused parts of the array, eg for when retessellating tessellation can introduce extra vertice...
void setWindingType(const WindingType wt)
Set and get tessellation windong rule.
Definition Tessellator:65
unsigned int _extraPrimitives
count of number of extra primitives added
Definition Tessellator:246
static void CALLBACK endCallback(void *userData)
void handleNewVertices(osg::Geometry &geom, VertexPtrToIndexMap &vertexPtrToIndexMap)
static void CALLBACK errorCallback(GLenum errorCode, void *userData)
TessellationType
we interpret all contours in the geometry as a single set to be tessellated or each separate drawable...
Definition Tessellator:54
@ TESS_TYPE_GEOMETRY
Definition Tessellator:55
@ TESS_TYPE_DRAWABLE
Definition Tessellator:56
@ TESS_TYPE_POLYGONS
Definition Tessellator:57
void addVertex(osg::Vec3 *vertex)
Add a vertex to the current contour, see gluTessVertex for details.
PrimList _primList
Definition Tessellator:220
void vertex(osg::Vec3 *vertex)
static void CALLBACK beginCallback(GLenum which, void *userData)
static void CALLBACK combineCallback(GLdouble coords[3], void *vertex_data[4], GLfloat weight[4], void **outData, void *useData)
void setTessellationType(const TessellationType tt)
Set and get tessellation type.
Definition Tessellator:69
void collectTessellation(osg::Geometry &cxgeom, unsigned int originalIndex)
NewVertexList _newVertexList
Definition Tessellator:222
void retessellatePolygons(osg::Geometry &cxgeom)
Change the contours lists of the geometry into tessellated primitives (the list of primitives in the ...
unsigned int _index
count number of primitives in a geometry to get right no.
Definition Tessellator:240
GLenum _errorCode
Definition Tessellator:223
void addContour(osg::PrimitiveSet *primitive, osg::Vec3Array *vertices)
static void CALLBACK vertexCallback(GLvoid *data, void *userData)
PrimList & getPrimList()
Definition Tessellator:116
std::vector< osg::ref_ptr< Prim > > PrimList
Definition Tessellator:114
std::map< osg::Vec3 *, unsigned int > VertexPtrToIndexMap
Definition Tessellator:129
std::vector< NewVertex > NewVertexList
Definition Tessellator:215
bool _boundaryOnly
Definition Tessellator:231
osg::GLUtesselator * _tobj
Definition Tessellator:218
WindingType
The winding rule, see red book ch 11.
Definition Tessellator:44
@ TESS_WINDING_NONZERO
Definition Tessellator:46
@ TESS_WINDING_ABS_GEQ_TWO
Definition Tessellator:49
@ TESS_WINDING_POSITIVE
Definition Tessellator:47
@ TESS_WINDING_ODD
Definition Tessellator:45
@ TESS_WINDING_NEGATIVE
Definition Tessellator:48
void addContour(GLenum mode, unsigned int first, unsigned int last, osg::Vec3Array *vertices)
void setBoundaryOnly(const bool tt)
Set and get tessellation request boundary only on/off.
Definition Tessellator:61
WindingType _wtype
winding rule, which parts will become solid
Definition Tessellator:226
std::vector< osg::Vec3 * > VecList
Definition Tessellator:93
VecList _vertices
Definition Tessellator:96
Prim(GLenum mode)
Definition Tessellator:91
GLenum _mode
Definition Tessellator:95
Definition Tessellator:151
double _v[3]
Definition Tessellator:152
float _f1
Definition Tessellator:198
osg::Vec3 * _vpos
Definition Tessellator:196
float _f2
Definition Tessellator:201
NewVertex(const NewVertex &nv)
Definition Tessellator:170
osg::Vec3 * _v1
Definition Tessellator:199
osg::Vec3 * _v2
Definition Tessellator:202
NewVertex(osg::Vec3 *vx, float f1, osg::Vec3 *v1, float f2, osg::Vec3 *v2, float f3, osg::Vec3 *v3, float f4, osg::Vec3 *v4)
Definition Tessellator:181
osg::Vec3 * _v3
Definition Tessellator:205
float _f4
Definition Tessellator:207
osg::Vec3 * _v4
Definition Tessellator:208
float _f3
Definition Tessellator:204
NewVertex()
Definition Tessellator:159
#define OSGUTIL_EXPORT
Definition Export:40