1 #ifndef _DA_TRIANGULATROR_H
2 #define _DA_TRIANGULATROR_H
17 void interpolateVec3(std::vector<osg::Vec3>* controlPoints, std::vector<osg::Vec3>* interpolatedPoints, PoAInterpolationType
type,
bool closed,
int p_steps);
32 void interpolate(std::vector<ref_ptr_DAControlPoint>* controlPoints, std::vector<osg::Vec3>* interpolatedPoints, std::vector<double>* tvalues = NULL,
int p_steps = 0,
bool lengthOptimization =
false,
bool closed =
false);
44 void triangulate(std::vector<ref_ptr_DAControlPoint>* controlPoints);
51 osg::Vec3
derivedCRI(
double t, osg::Vec3 p0, osg::Vec3 p1, osg::Vec3 p2, osg::Vec3 p3);
54 osg::Vec3
doubleDerivedCRI(
double t, osg::Vec3 p0, osg::Vec3 p1, osg::Vec3 p2, osg::Vec3 p3);
57 osg::Vec3
tripleDerivedCRI(
double t, osg::Vec3 p0, osg::Vec3 p1, osg::Vec3 p2, osg::Vec3 p3);
61 PoATriangulationType triangulationType;
62 PoAInterpolationType interpolationType;
64 osg::ref_ptr<osg::Geometry> geometry;
65 osg::ref_ptr<osg::Vec3Array> vertices;
66 osg::ref_ptr<osg::Vec3Array> normals;
67 osg::ref_ptr<osg::Vec4Array> colours;
74 osg::ref_ptr<MTBrush> brush;
75 bool closedCrossSection;
76 bool interpolatedCrossSection;
81 std::vector<osg::Vec3> *interpolatedCrosssPoints;
82 std::vector<osg::Vec3> *interpolatedCrosssNormals;
86 bool createCrossSection(
DAControlPoint *point,
double diameter, osg::Vec3Array *crossSection, osg::Vec3Array *normals);
89 osg::Vec3 interpolatePoint(
double t, osg::Vec3 point1, osg::Vec3 point2, osg::Vec3 point0 = osg::Vec3(0.0, 0.0, 0.0), osg::Vec3 point3 = osg::Vec3(0.0, 0.0, 0.0));
91 std::vector<ref_ptr_SimpleBox>* shapes;
96 #endif // _DA_TRIANGULATROR_H