14 #ifndef OSGUTIL_Tessellator
15 #define OSGUTIL_Tessellator
17 #include <osg/Geometry>
19 #include <osgUtil/Export>
91 Prim(GLenum mode):_mode(mode) {}
99 virtual void beginTessellation();
112 void endTessellation();
114 typedef std::vector< osg::ref_ptr<Prim> >
PrimList;
125 void reduceArray(
osg::Array * cold,
const unsigned int nnu);
127 void collectTessellation(
osg::Geometry &cxgeom,
unsigned int originalIndex);
130 void addContour(GLenum mode,
unsigned int first,
unsigned int last,
osg::Vec3Array* vertices);
132 void handleNewVertices(
osg::Geometry& geom,VertexPtrToIndexMap &vertexPtrToIndexMap);
134 void begin(GLenum mode);
136 void combine(
osg::Vec3* vertex,
void* vertex_data[4],GLfloat weight[4]);
138 void error(GLenum errorCode);
141 static void CALLBACK beginCallback(GLenum which,
void* userData);
142 static void CALLBACK vertexCallback(GLvoid *data,
void* userData);
143 static void CALLBACK combineCallback(
GLdouble coords[3],
void* vertex_data[4],
144 GLfloat weight[4],
void** outData,
146 static void CALLBACK endCallback(
void* userData);
147 static void CALLBACK errorCallback(GLenum errorCode,
void* userData);
std::vector< ref_ptr< PrimitiveSet > > PrimitiveSetList
std::map< osg::Vec3 *, unsigned int > VertexPtrToIndexMap
#define GLU_TESS_WINDING_NONZERO
unsigned int _numberVerts
#define GLU_TESS_WINDING_ODD
std::vector< osg::ref_ptr< Prim > > PrimList
#define GLU_TESS_WINDING_POSITIVE
void setTessellationType(const TessellationType tt)
osg::GLUtesselator * _tobj
osg::Geometry::PrimitiveSetList getContours()
#define GLU_TESS_WINDING_ABS_GEQ_TWO
void setWindingType(const WindingType wt)
void setBoundaryOnly(const bool tt)
std::vector< osg::Vec3 * > VecList
std::vector< NewVertex > NewVertexList
std::vector< Vec3d * > Vec3dList
NewVertex(osg::Vec3 *vx, float f1, osg::Vec3 *v1, float f2, osg::Vec3 *v2, float f3, osg::Vec3 *v3, float f4, osg::Vec3 *v4)
osg::Geometry::PrimitiveSetList _Contours
WindingType getWindingType()
#define GLU_TESS_WINDING_NEGATIVE
unsigned int _extraPrimitives
void setTessellationNormal(const osg::Vec3 norm)
TessellationType getTessellationType()
NewVertexList _newVertexList
NewVertex(const NewVertex &nv)
Shader generator framework.