vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FilletSpline.h
Go to the documentation of this file.
1 #pragma once
2 #include "Spline.h"
3 
4 
13 class FilletSpline : public SplineDecorator
14 {
15 
16 public:
17  FilletSpline(double filletRadius, unsigned int filletSteps, SplinePtr decoratedSpline);
18 
20  META_DAObjectDecorator(_decoratedSpline, FilletSpline, "Fillet Spline")
21 
22  virtual Vec3ArrayPtr getPoints();
23 
24 protected:
25 
26  // radius of rounding
27  double _filletRadius;
28 
29  // number of interpolated points
30  unsigned int _filletSteps;
31 
32 
33  void generateAllFilletPoints( Vec3ArrayPtr result, osg::Vec3 p1, osg::Vec3 p2, osg::Vec3 p3 );
34 
35  void getFilletPoints(osg::Vec3 p1, osg::Vec3 p2, osg::Vec3 p3, osg::Vec3& f1, osg::Vec3& f2);
36 };
37 
38 typedef osg::ref_ptr<FilletSpline> FilletSplinePtr;
39