36 for (
int i = 0; i < 3; ++i )
37 q[i] = lerp( p[i], p[i+1], t );
40 for (
int i = 0; i < 2; ++i )
41 r[i] = lerp( q[i], q[i+1], t );
43 return lerp( r[0], r[1], t );
56 w[3] = 1 - w[0] - w[1] - w[2];
V p[4]
4 control points
Definition MRBezier.h:22
static std::array< T, 4 > getWeights(T t)
computes weights of every control point for given parameter value, the sum of all weights is equal to...
Definition MRBezier.h:47
static constexpr int size
Definition MRMesh/MRVectorTraits.h:22
typename VTraits::BaseType T
Definition MRBezier.h:18
V getPoint(T t) const
computes point on the curve from parameter value
Definition MRBezier.h:32
static constexpr int elements
Definition MRBezier.h:19
T BaseType
The base template handles scalars (or just non-vectors).
Definition MRMesh/MRVectorTraits.h:21
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Cubic Bezier curve.
Definition MRBezier.h:16
Common traits for (mathematical) vectors.
Definition MRMesh/MRVectorTraits.h:18