Originally a simple class for tessellating a single polygon boundary.
Inheritance:
Public Classes
-
enum WindingType
- The winding rule, see red book ch 11.
-
enum TesselationType
- we interpret all contours in the geometry as a single set to be tesselated or each separate drawable's contours needs to be tesselated.
-
struct Prim: public osg::Referenced
Public Methods
-
Tesselator()
-
~Tesselator()
-
void setBoundaryOnly(const bool tt)
- Set and get tesselation request boundary only on/off
-
inline const bool getBoundaryOnly( )
-
void setWindingType(const WindingType wt)
- Set and get tesselation windong rule
-
inline const WindingType getWindingType( )
-
void setTesselationType(const TesselationType tt)
- Set and get tesselation type
-
inline const TesselationType getTesselationType( )
-
void retesselatePolygons(osg::Geometry &cxgeom)
- Change the contours lists of the geometry into tesselated primitives (the list of primitives in the original geometry is stored in the tesselator for possible re-use.
-
osg::Geometry::PrimitiveSetList getContours()
-
void beginTesselation()
-
void beginContour()
-
void addVertex(osg::Vec3* vertex)
-
void endContour()
-
void endTesselation()
-
PrimList& getPrimList()
-
void reset()
Public
-
typedef std::vector<osg::Vec3*> VertexPointList
-
typedef std::vector< osg::ref_ptr<Prim> > PrimList
Protected Classes
-
struct Vec3d
-
struct NewVertex
Protected Fields
-
GLUtesselator* _tobj
-
PrimList _primList
-
Vec3dList _coordData
-
NewVertexList _newVertexList
-
GLenum _errorCode
-
WindingType _wtype
- winding rule, which parts will become solid
-
TesselationType _ttype
- tesselation rule, which parts will become solid
-
bool _boundaryOnly
-
unsigned int _numberVerts
- number of vertices that are part of the 'original' set of contours
-
osg::Geometry::PrimitiveSetList _Contours
- List of primitives that define the contours
-
unsigned int _index
- count number of primitives in a geometry to get right no.
Protected Methods
-
void reduceArray(osg::Array* cold, const unsigned int nnu)
- remove unused parts of the array, eg for wehn retesselating tesselation can introduce extra vertices for concave or crossing boundaries, these will leak memory if not removed when retesselating.
-
void collectTesselation(osg::Geometry &cxgeom)
-
void addContour(osg::PrimitiveSet* primitive, osg::Vec3Array* vertices)
-
void handleNewVertices(osg::Geometry& geom, VertexPtrToIndexMap &vertexPtrToIndexMap)
-
void begin(GLenum mode)
-
void vertex(osg::Vec3* vertex)
-
void combine(osg::Vec3* vertex, void* vertex_data[4], GLfloat weight[4])
-
void end()
-
void error(GLenum errorCode)
-
static void CALLBACK beginCallback(GLenum which, void* userData)
-
static void CALLBACK vertexCallback(GLvoid* data, void* userData)
-
static void CALLBACK combineCallback(GLdouble coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, void* useData)
-
static void CALLBACK endCallback(void* userData)
-
static void CALLBACK errorCallback(GLenum errorCode, void* userData)
Protected
-
typedef std::map<osg::Vec3*,unsigned int> VertexPtrToIndexMap
-
typedef std::vector<NewVertex> NewVertexList
-
typedef std::vector<Vec3d*> Vec3dList
Documentation
Originally a simple class for tessellating a single polygon boundary.
Using old style glu tessellation functions for portability.
Upgraded Jan 2004 to use the modern glu tessellation functions.
- Tesselator()
- ~Tesselator()
- enum WindingType
- The winding rule, see red book ch 11.
- TESS_WINDING_ODD
- TESS_WINDING_NONZERO
- TESS_WINDING_POSITIVE
- TESS_WINDING_NEGATIVE
- TESS_WINDING_ABS_GEQ_TWO
- enum TesselationType
- we interpret all contours in the geometry as a single set to be tesselated or
each separate drawable's contours needs to be tesselated.
- TESS_TYPE_GEOMETRY
- TESS_TYPE_DRAWABLE
- TESS_TYPE_POLYGONS
- void setBoundaryOnly(const bool tt)
- Set and get tesselation request boundary only on/off
- inline const bool getBoundaryOnly( )
- void setWindingType(const WindingType wt)
- Set and get tesselation windong rule
- inline const WindingType getWindingType( )
- void setTesselationType(const TesselationType tt)
- Set and get tesselation type
- inline const TesselationType getTesselationType( )
- void retesselatePolygons(osg::Geometry &cxgeom)
- Change the contours lists of the geometry into tesselated primitives (the
list of primitives in the original geometry is stored in the tesselator for
possible re-use.
The name remains retesselatePolygons although it now handles trifans, strips, quads etc.
as well as Polygons so as to not break old codes relying on this function name.
- osg::Geometry::PrimitiveSetList getContours()
- typedef std::vector<osg::Vec3*> VertexPointList
- struct Prim: public osg::Referenced
- Prim(GLenum mode)
- typedef std::vector<osg::Vec3*> VecList
- GLenum _mode
- VecList _vertices
- void beginTesselation()
- void beginContour()
- void addVertex(osg::Vec3* vertex)
- void endContour()
- void endTesselation()
- typedef std::vector< osg::ref_ptr<Prim> > PrimList
- PrimList& getPrimList()
- void reset()
- void reduceArray(osg::Array* cold, const unsigned int nnu)
- remove unused parts of the array, eg for wehn retesselating
tesselation can introduce extra vertices for concave or crossing boundaries,
these will leak memory if not removed when retesselating.
- void collectTesselation(osg::Geometry &cxgeom)
- typedef std::map<osg::Vec3*,unsigned int> VertexPtrToIndexMap
- void addContour(osg::PrimitiveSet* primitive, osg::Vec3Array* vertices)
- void handleNewVertices(osg::Geometry& geom, VertexPtrToIndexMap &vertexPtrToIndexMap)
- void begin(GLenum mode)
- void vertex(osg::Vec3* vertex)
- void combine(osg::Vec3* vertex, void* vertex_data[4], GLfloat weight[4])
- void end()
- void error(GLenum errorCode)
- static void CALLBACK beginCallback(GLenum which, void* userData)
- static void CALLBACK vertexCallback(GLvoid* data, void* userData)
- static void CALLBACK combineCallback(GLdouble coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, void* useData)
- static void CALLBACK endCallback(void* userData)
- static void CALLBACK errorCallback(GLenum errorCode, void* userData)
- struct Vec3d
- double _v[3]
- struct NewVertex
- NewVertex()
- NewVertex(const NewVertex& nv)
- 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::Vec3* _vpos
- float _f1
- osg::Vec3* _v1
- float _f2
- osg::Vec3* _v2
- float _f3
- osg::Vec3* _v3
- float _f4
- osg::Vec3* _v4
- typedef std::vector<NewVertex> NewVertexList
- typedef std::vector<Vec3d*> Vec3dList
- GLUtesselator* _tobj
- PrimList _primList
- Vec3dList _coordData
- NewVertexList _newVertexList
- GLenum _errorCode
- WindingType _wtype
- winding rule, which parts will become solid
- TesselationType _ttype
- tesselation rule, which parts will become solid
- bool _boundaryOnly
- unsigned int _numberVerts
- number of vertices that are part of the 'original' set of contours
- osg::Geometry::PrimitiveSetList _Contours
- List of primitives that define the contours
- unsigned int _index
- count number of primitives in a geometry to get right no. of norms/colurs etc for per_primitive attributes.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.