17 #ifndef BEZIER_CURVE_H_ 18 #define BEZIER_CURVE_H_ 59 BezierCurve(
const Vec3 *_p,
unsigned int _nPoints,
const Real *_k,
unsigned int _nKnots ) noexcept;
82 void draw()
const noexcept;
86 void drawControlPoints()
const noexcept;
90 void drawHull()
const noexcept;
96 Vec3 getPointOnCurve(
Real _value)
const noexcept;
102 void addPoint(
const Vec3 &_p) noexcept;
115 void addKnot(
Real _k) noexcept;
119 void createKnots() noexcept;
129 Real coxDeBoor(
Real _u,
unsigned int _i,
unsigned int _k,
const std::vector <Real> &_knots)
const noexcept;
138 void setLOD(
int _lod) noexcept{m_lod=_lod;}
142 void createVAO() noexcept;
187 #endif // end header file
Generic Bezier Curve Class allowing the user to generate basic curves using a number of different con...
main definition of types and namespace
unsigned int m_lod
The level of detail used to calculate how much detail to draw.
std::vector< Vec3 > m_cp
the contol points for the curve
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
implementation files for RibExport class
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
std::vector< Real > m_knots
the knot vector for the curve
base class for all VAO from the VAOFactory this defines the base class type with simple draw / bind b...
a simple 3 tuple container for compatibility with glsl
unsigned int m_degree
The degree of the curve, Calculated from the Number of Control Points.
unsigned int m_numCP
The ammount of Control Points in the Curve.
unsigned int m_order
The Order of the Curve = Degree +1.
GLuint m_listIndex
the display list index created from glCreateLists
AbstractVAO * m_vaoPoints
a vertex array object for our point drawing
unsigned int m_numKnots
The knot vector always has as many values as the numer of verts (cp) + the degree.
AbstractVAO * m_vaoCurve
a vertex array object for our curve drawing
void setLOD(int _lod) noexcept
set the Level of Detail for Drawing