14#ifndef OSGUTIL_DELAUNAYTRIANGULATOR_
15#define OSGUTIL_DELAUNAYTRIANGULATOR_
115 typedef std::vector< osg::ref_ptr<DelaunayConstraint> >
linelist;
172 void _uniqueifyPoints();
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
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition PrimitiveSet:502
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
DelaunayTriangulator: Utility class that triangulates an irregular network of sample points.
Definition DelaunayTriangulator:38
osg::DrawElementsUInt * getTriangles()
Definition DelaunayTriangulator:65
void addtriangle(int i1, int i2, int i3)
Each primitiveset is a list of vertices which may be closed by joining up to its start to make a loop...
std::vector< int * > trilist
Definition DelaunayTriangulator:100
float windingNumber(const osg::Vec3 &testpoint) const
return winding number as a float of loop around testpoint; may use multiple loops does not reject poi...
osg::ref_ptr< osg::DrawElementsUInt > prim_tris_
Definition DelaunayTriangulator:104
virtual bool contains(const osg::Vec3 &testpoint) const
true if testpoint is internal (or external) to constraint.
const osg::DrawElementsUInt * getTriangles() const
Get the filling primitive.
Definition DelaunayTriangulator:63
osg::Vec3Array * getPoints(const osg::Vec3Array *points)
Call BEFORE makeDrawable to reorder points to make optimised set.
virtual ~DelaunayConstraint()
DelaunayConstraint()
Definition DelaunayTriangulator:44
void merge(DelaunayConstraint *dco)
Add vertices and constraint loops from dco Can be used to generate extra vertices where dco crosses '...
void removeVerticesInside(const DelaunayConstraint *dco)
remove from line the vertices that are inside dco
virtual bool outside(const osg::Vec3 &testpoint) const
void handleOverlaps(void)
Tessellate the constraint loops so that the crossing points are interpolated and added to the constra...
trilist _interiorTris
Definition DelaunayTriangulator:102
osg::DrawElementsUInt * makeDrawable()
converts simple list of triangles into a drawarray.
void setInputPointArray(osg::Vec3Array *points)
Set the input point array.
Definition DelaunayTriangulator:118
osg::Vec3Array * getInputPointArray()
Get the input point array.
Definition DelaunayTriangulator:124
void addInputConstraint(DelaunayConstraint *dc)
Add an input constraint loop.
Definition DelaunayTriangulator:142
DelaunayTriangulator & operator=(const DelaunayTriangulator &)
Definition DelaunayTriangulator:161
osg::Vec3Array * getOutputNormalArray()
Get the output normal array (optional).
Definition DelaunayTriangulator:134
bool triangulate()
Start triangulation.
std::vector< osg::ref_ptr< DelaunayConstraint > > linelist
Definition DelaunayTriangulator:115
void removeInternalTriangles(DelaunayConstraint *constraint)
remove the triangles internal to the constraint loops.
void setOutputNormalArray(osg::Vec3Array *normals)
Set the output normal array (optional).
Definition DelaunayTriangulator:128
const osg::DrawElementsUInt * getTriangles() const
Get the generated primitive (call triangulate() first).
Definition DelaunayTriangulator:149
virtual ~DelaunayTriangulator()
DelaunayTriangulator(osg::Vec3Array *points, osg::Vec3Array *normals=0)
DelaunayTriangulator(const DelaunayTriangulator ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
osg::DrawElementsUInt * getTriangles()
Get the generated primitive (call triangulate() first).
Definition DelaunayTriangulator:152
int getindex(const osg::Vec3 &pt, const osg::Vec3Array *points)
const osg::Vec3Array * getInputPointArray() const
Get the const input point array.
Definition DelaunayTriangulator:121
const osg::Vec3Array * getOutputNormalArray() const
Get the const output normal array (optional).
Definition DelaunayTriangulator:131
#define OSGUTIL_EXPORT
Definition Export:40