VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | Private Member Functions
makVrv::DtOsgEarthBoundary Class Reference

DtOsgEarthBoundary.

This class is the same as osgEarth::BoundaryUtil. It's used to generate a boundary of a osg::Node.

Classes

class  VertexCollectionVisitor
 

Public Member Functions

 DtOsgEarthBoundary ()
 

Static Public Member Functions

static void setTolerance (double meters)
 
static double getTolerance ()
 
static osg::Vec3dArray * getBoundary (osg::Node *modelNode, bool geocentric=true, bool convexHull=false)
 
static osg::Vec3dArray * findHull (osg::Vec3dArray &points)
 
static osg::Vec3dArray * findMeshBoundary (osg::Node *modelNode, bool geocentric=true)
 

Static Protected Member Functions

static osg::Vec3dArray * hullPresortPoints (osg::Vec3dArray &points)
 
static float isLeft (osg::Vec3d P0, osg::Vec3d P1, osg::Vec3d P2)
 

Static Protected Attributes

static double myTolerance
 

Private Member Functions

 DtOsgEarthBoundary (const DtOsgEarthBoundary &)
 
DtOsgEarthBoundaryoperator= (const DtOsgEarthBoundary &)
 

Constructor & Destructor Documentation

makVrv::DtOsgEarthBoundary::DtOsgEarthBoundary ( )

The default constructor.

makVrv::DtOsgEarthBoundary::DtOsgEarthBoundary ( const DtOsgEarthBoundary )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

static void makVrv::DtOsgEarthBoundary::setTolerance ( double  meters)
static

Sets the tolerance when combining close verts. Default = 0.01.

static double makVrv::DtOsgEarthBoundary::getTolerance ( )
inlinestatic

Gets the tolerance when combining close verts. Default = 0.01.

static osg::Vec3dArray* makVrv::DtOsgEarthBoundary::getBoundary ( osg::Node *  modelNode,
bool  geocentric = true,
bool  convexHull = false 
)
static

Use the vertices of the given node to calculate a boundary via the findHull() method.

static osg::Vec3dArray* makVrv::DtOsgEarthBoundary::findHull ( osg::Vec3dArray &  points)
static

Finds the convex hull for the given points using the Andrew's monotone chain algorithm. Returns an ordered set of points defining the hull.

static osg::Vec3dArray* makVrv::DtOsgEarthBoundary::findMeshBoundary ( osg::Node *  modelNode,
bool  geocentric = true 
)
static

Finds the boundary of the mesh.

Parameters
modelNodeThe node of the model.
geocentricIf the model is in geocentric coordinate.
static osg::Vec3dArray* makVrv::DtOsgEarthBoundary::hullPresortPoints ( osg::Vec3dArray &  points)
staticprotected

Returns an array containing the points sorted first by x and then by y.

static float makVrv::DtOsgEarthBoundary::isLeft ( osg::Vec3d  P0,
osg::Vec3d  P1,
osg::Vec3d  P2 
)
inlinestaticprotected

Tests if a point is Left|On|Right of an infinite line Returns: >0 for P2 left of the line through P0 and P1 0 for P2 on the line <0 for P2 right of the line.

Implementation based on method from softSurfer (www.softsurfer.com)

DtOsgEarthBoundary& makVrv::DtOsgEarthBoundary::operator= ( const DtOsgEarthBoundary )
private

Assignment Operator not implemented – Copy not allowed.

Member Data Documentation

double makVrv::DtOsgEarthBoundary::myTolerance
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)