Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

osgUtil::DelaunayConstraint Class Reference

DelaunayTriangulator: Utility class that triangulates an irregular network of sample points. More...

Inheritance diagram for osgUtil::DelaunayConstraint:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DelaunayConstraint ()
void addtriangle (const int i1, const int i2, const int i3)
 collect up indices of triangle from delaunay triangles.

const osg::DrawElementsUIntgetTriangles () const
 Get the filling primitive.

osg::DrawElementsUIntgetTriangles ()
osg::Vec3ArraygetPoints (const osg::Vec3Array *points)
 Call BEFORE makeDrawable to reorder points to make optimised set.

osg::DrawElementsUIntmakeDrawable ()
 converts simple list of triangles into a drawarray.

void merge (DelaunayConstraint *dco)
 Add vertices and constraint loops from dco Can be used to generate extra vertices where dco crosses 'this' using osgUtil::tesselator to insert overlap vertices.

void removeVerticesInside (const DelaunayConstraint *dco)
 remove from line the vertices that are inside dco

float windingNumber (const osg::Vec3 testpoint) const
 return winding number as a float of loop around testpoint; may use multiple loops does not reject points on the edge or very very close to the edge

virtual bool contains (const osg::Vec3 testpoint) const
 true if testpoint is internal (or external) to constraint.

virtual bool outside (const osg::Vec3 testpoint) const
void handleOverlaps (void)
 Tesselate the constraint loops so that the crossing points are interpolated and added to the contraints for the triangulation.


Protected Types

typedef std::vector< int * > trilist

Protected Member Functions

virtual ~DelaunayConstraint ()

Protected Attributes

trilist _interiorTris
osg::ref_ptr< osg::DrawElementsUIntprim_tris_

Detailed Description

DelaunayTriangulator: Utility class that triangulates an irregular network of sample points.

Just create a DelaunayTriangulator, assign it the sample point array and call its triangulate() method to start the triangulation. Then you can obtain the generated primitive by calling the getTriangles() method.

Add DelaunayConstraints (or derived class) to control the triangulation edges.


Member Typedef Documentation

typedef std::vector< int* > osgUtil::DelaunayConstraint::trilist [protected]
 


Constructor & Destructor Documentation

osgUtil::DelaunayConstraint::DelaunayConstraint  )  [inline]
 

virtual osgUtil::DelaunayConstraint::~DelaunayConstraint  )  [inline, protected, virtual]
 


Member Function Documentation

void osgUtil::DelaunayConstraint::addtriangle const int  i1,
const int  i2,
const int  i3
 

collect up indices of triangle from delaunay triangles.

The delaunay triangles inside the DelaunayConstraint area can be used to fill the area or generate geometry that terrain follows the area in some way. These triangles can form a canopy or a field.

virtual bool osgUtil::DelaunayConstraint::contains const osg::Vec3  testpoint  )  const [virtual]
 

true if testpoint is internal (or external) to constraint.

osg::Vec3Array* osgUtil::DelaunayConstraint::getPoints const osg::Vec3Array points  ) 
 

Call BEFORE makeDrawable to reorder points to make optimised set.

osg::DrawElementsUInt * osgUtil::DelaunayConstraint::getTriangles  )  [inline]
 

const osg::DrawElementsUInt * osgUtil::DelaunayConstraint::getTriangles  )  const [inline]
 

Get the filling primitive.

One: triangulate must have bneen called and two: triangle list is filled when DelaunayTriangulator::removeInternalTriangles is called. These return the triangles removed from the delaunay triangulation by DelaunayTriangulator::removeInternalTriangles.

void osgUtil::DelaunayConstraint::handleOverlaps void   ) 
 

Tesselate the constraint loops so that the crossing points are interpolated and added to the contraints for the triangulation.

osg::DrawElementsUInt* osgUtil::DelaunayConstraint::makeDrawable  ) 
 

converts simple list of triangles into a drawarray.

void osgUtil::DelaunayConstraint::merge DelaunayConstraint dco  ) 
 

Add vertices and constraint loops from dco Can be used to generate extra vertices where dco crosses 'this' using osgUtil::tesselator to insert overlap vertices.

virtual bool osgUtil::DelaunayConstraint::outside const osg::Vec3  testpoint  )  const [virtual]
 

void osgUtil::DelaunayConstraint::removeVerticesInside const DelaunayConstraint dco  ) 
 

remove from line the vertices that are inside dco

float osgUtil::DelaunayConstraint::windingNumber const osg::Vec3  testpoint  )  const
 

return winding number as a float of loop around testpoint; may use multiple loops does not reject points on the edge or very very close to the edge


Member Data Documentation

trilist osgUtil::DelaunayConstraint::_interiorTris [protected]
 

osg::ref_ptr<osg::DrawElementsUInt> osgUtil::DelaunayConstraint::prim_tris_ [protected]
 


The documentation for this class was generated from the following file:
Generated at Thu Nov 24 16:25:35 2005 for the OpenSceneGraph by doxygen 1.3.6.