KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BEZIER< NumericType > Class Template Reference

Generic cubic Bezier representation. More...

#include <bezier_curves.h>

Public Member Functions

 BEZIER ()=default
 
constexpr BEZIER (const VECTOR2< NumericType > &aStart, const VECTOR2< NumericType > &aC1, const VECTOR2< NumericType > &aC2, const VECTOR2< NumericType > &aEnd)
 
constexpr VECTOR2< NumericType > PointAt (double aT) const
 Evaluate the Bezier curve at a given t value.
 

Public Attributes

VECTOR2< NumericType > Start
 
VECTOR2< NumericType > C1
 
VECTOR2< NumericType > C2
 
VECTOR2< NumericType > End
 

Detailed Description

template<typename NumericType>
class BEZIER< NumericType >

Generic cubic Bezier representation.

Definition at line 94 of file bezier_curves.h.

Constructor & Destructor Documentation

◆ BEZIER() [1/2]

template<typename NumericType>
BEZIER< NumericType >::BEZIER ( )
default

◆ BEZIER() [2/2]

template<typename NumericType>
BEZIER< NumericType >::BEZIER ( const VECTOR2< NumericType > & aStart,
const VECTOR2< NumericType > & aC1,
const VECTOR2< NumericType > & aC2,
const VECTOR2< NumericType > & aEnd )
inlineconstexpr

Definition at line 99 of file bezier_curves.h.

References C1, C2, End, and Start.

Member Function Documentation

◆ PointAt()

template<typename NumericType>
VECTOR2< NumericType > BEZIER< NumericType >::PointAt ( double aT) const
inlineconstexpr

Evaluate the Bezier curve at a given t value.

aT doesn't have to be in the range [0, 1], but if it's not, the point will not be on the curve.

Parameters
aTthe t value to evaluate the curve at (0 = start, 1 = end)
Returns
the point on the curve at t (0 <= t <= 1)

Definition at line 114 of file bezier_curves.h.

References C1, C2, End, and Start.

Member Data Documentation

◆ C1

template<typename NumericType>
VECTOR2<NumericType> BEZIER< NumericType >::C1

Definition at line 127 of file bezier_curves.h.

Referenced by BEZIER(), PointAt(), and TransformEllipseToBeziers().

◆ C2

template<typename NumericType>
VECTOR2<NumericType> BEZIER< NumericType >::C2

Definition at line 128 of file bezier_curves.h.

Referenced by BEZIER(), PointAt(), and TransformEllipseToBeziers().

◆ End

template<typename NumericType>
VECTOR2<NumericType> BEZIER< NumericType >::End

Definition at line 129 of file bezier_curves.h.

Referenced by BEZIER(), PointAt(), and TransformEllipseToBeziers().

◆ Start

template<typename NumericType>
VECTOR2<NumericType> BEZIER< NumericType >::Start

Definition at line 126 of file bezier_curves.h.

Referenced by BEZIER(), PointAt(), and TransformEllipseToBeziers().


The documentation for this class was generated from the following file: