24#ifndef BEZIER_CURVES_H
25#define BEZIER_CURVES_H
30template <
typename T>
class ELLIPSE;
43 BEZIER_POLY(
const std::vector<VECTOR2I>& aControlPoints );
60 void GetPoly( std::vector<VECTOR2I>& aOutput,
int aMinSegLen = 0,
int aMaxSegCount = 32 );
61 void GetPoly( std::vector<VECTOR2D>& aOutput,
double aMinSegLen = 0.0,
int aMaxSegCount = 32 );
76template <
typename NumericType>
void TransformEllipseToBeziers(const ELLIPSE< T > &aEllipse, std::vector< BEZIER< T > > &aBeziers)
Transforms an ellipse or elliptical arc into a set of quadratic Bezier curves that approximate it.
Bezier curves to polygon converter.
double m_minSegLen
Control points.
BEZIER_POLY(const VECTOR2I &aStart, const VECTOR2I &aCtrl1, const VECTOR2I &aCtrl2, const VECTOR2I &aEnd)
BEZIER_POLY(const std::vector< VECTOR2D > &aControlPoints)
std::vector< VECTOR2D > m_ctrlPts
void GetPoly(std::vector< VECTOR2I > &aOutput, int aMinSegLen=0, int aMaxSegCount=32)
Convert a Bezier curve to a polygon.
Generic cubic Bezier representation.
VECTOR2< NumericType > Start
VECTOR2< NumericType > C1
VECTOR2< NumericType > C2
VECTOR2< NumericType > End
BEZIER(VECTOR2< NumericType > aStart, VECTOR2< NumericType > aC1, VECTOR2< NumericType > aC2, VECTOR2< NumericType > aEnd)
This class was created to handle importing ellipses from other file formats that support them nativel...