15 #include <osg/CoordinateSystemNode>
16 #include <osg/NodeVisitor>
47 void apply(osg::Node& node);
50 void apply(osg::Transform& transform);
53 void apply(osg::Geode& geode);
56 inline void pushMatrix(osg::Matrix& matrix) { _matrixStack.push_back(matrix); }
59 inline void popMatrix() { _matrixStack.pop_back(); }
62 void applyDrawable(osg::Drawable* drawable);
73 void addVertex(osg::Vec3 vertex);
80 static void setTolerance(
double meters);
86 static osg::Vec3dArray* getBoundary(osg::Node* modelNode,
bool geocentric =
true,
bool convexHull =
false);
90 static osg::Vec3dArray* findHull(osg::Vec3dArray& points);
95 static osg::Vec3dArray* findMeshBoundary(osg::Node* modelNode,
bool geocentric =
true);
99 static osg::Vec3dArray* hullPresortPoints(osg::Vec3dArray& points);
107 static inline float isLeft(osg::Vec3d P0, osg::Vec3d P1, osg::Vec3d P2)
109 return (P1.x() - P0.x())*(P2.y() - P0.y()) - (P2.x() - P0.x())*(P1.y() - P0.y());
VertexCollectionVisitor.
Definition: DtOsgEarthBoundary.h:31
osg::Vec3dArray * getVertices()
Resets the visitor for next use.
Definition: DtOsgEarthBoundary.h:44
DtOsgEarthBoundary.
Definition: DtOsgEarthBoundary.h:25
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
void popMatrix()
Pops the matrix into matrix stack.
Definition: DtOsgEarthBoundary.h:59
bool _geocentric
Definition: DtOsgEarthBoundary.h:70
static float isLeft(osg::Vec3d P0, osg::Vec3d P1, osg::Vec3d P2)
Tests if a point is Left|On|Right of an infinite line Returns: >0 for P2 left of the line through P0 ...
Definition: DtOsgEarthBoundary.h:107
MatrixStack _matrixStack
Definition: DtOsgEarthBoundary.h:69
std::vector< osg::Matrix > MatrixStack
Definition: DtOsgEarthBoundary.h:66
void pushMatrix(osg::Matrix &matrix)
Pushes the matrix into matrix stack.
Definition: DtOsgEarthBoundary.h:56
osg::ref_ptr< osg::EllipsoidModel > _ellipsoidModel
Definition: DtOsgEarthBoundary.h:71
static double myTolerance
Definition: DtOsgEarthBoundary.h:112
static double getTolerance()
Gets the tolerance when combining close verts. Default = 0.01.
Definition: DtOsgEarthBoundary.h:83
Contains DLL export macros.
osg::ref_ptr< osg::Vec3dArray > _vertices
Definition: DtOsgEarthBoundary.h:68