#include <Spline.h>
|
| Spline () |
|
void | evaluate_percent (float t, Vector3 &c) const |
|
void | evaluate_derivative (float t, Vector3 &hermite) const |
|
void | evaluate_percent (index_type Idx, float u, Vector3 &c) const |
|
void | evaluate_derivative (index_type Idx, float u, Vector3 &c) const |
|
index_type | computeIndexInBounds (float t) const |
|
void | computeIndex (float t, index_type &out_idx, float &out_u) const |
|
void | init_spline (const Vector3 *controls, index_type count, EvaluationMode m) |
|
void | init_cyclic_spline (const Vector3 *controls, index_type count, EvaluationMode m, index_type cyclic_point) |
|
void | initLengths () |
|
template<class T > |
void | initLengths (T &cacher) |
|
length_type | length () const |
|
length_type | length (index_type first, index_type last) const |
|
length_type | length (index_type Idx) const |
|
void | set_length (index_type i, length_type length) |
|
void | clear () |
|
template<typename length_type>
template<typename length_type>
template<typename length_type>
template<typename length_type >
LengthArray lengths
Definition: Spline.h:142
template<typename length_type >
66 ASSERT(t >= 0.f && t <= 1.f);
67 length_type length_ = t *
length();
70 u = (length_ -
length(index)) / (
float)
length(index, index+1);
length_type length() const
Definition: Spline.h:199
index_type index_hi
Definition: Spline.h:47
#define ASSERT
Definition: Errors.h:55
index_type computeIndexInBounds(length_type length) const
Definition: SplineImpl.h:37
template<typename length_type>
58 while (i+1 < N &&
lengths[i+1] < length_)
LengthArray lengths
Definition: Spline.h:142
int index_type
Definition: Spline.h:31
index_type index_lo
Definition: Spline.h:46
index_type index_hi
Definition: Spline.h:47
template<typename length_type>
75 ASSERT(t >= 0.f && t <= 1.f);
length_type length() const
Definition: Spline.h:199
#define ASSERT
Definition: Errors.h:55
index_type computeIndexInBounds(length_type length) const
Definition: SplineImpl.h:37
template<typename length_type >
Calculates derivation for given t
- Parameters
-
t | - percent of spline's length, assumes that t in range [0, 1]. |
void computeIndex(float t, index_type &out_idx, float &out_u) const
Definition: SplineImpl.h:64
int index_type
Definition: Spline.h:31
void evaluate_derivative(float t, Vector3 &hermite) const
Definition: SplineImpl.h:29
template<typename length_type>
Caclulates derivation for index Idx, and percent of segment length t
- Parameters
-
Idx | - spline segment index, should be in range [first, last) |
t | - percent of spline segment length, assumes that t in range [0, 1]. |
165 { SplineBase::evaluate_derivative(Idx, u, c);}
template<typename length_type >
Calculates the position for given t
- Parameters
-
t | - percent of spline's length, assumes that t in range [0, 1]. |
void evaluate_percent(float t, Vector3 &c) const
Definition: SplineImpl.h:21
void computeIndex(float t, index_type &out_idx, float &out_u) const
Definition: SplineImpl.h:64
int index_type
Definition: Spline.h:31
template<typename length_type>
Calculates the position for given segment Idx, and percent of segment length t
- Parameters
-
t | = partial_segment_length / whole_segment_length |
Idx | - spline segment index, should be in range [first, last). |
160 { SplineBase::evaluate_percent(Idx, u, c);}
template<typename length_type>
173 { SplineBase::init_cyclic_spline(controls, count, m, cyclic_point);}
template<typename length_type>
Initializes spline. Don't call other methods while spline not initialized.
172 { SplineBase::init_spline(controls, count, m);}
template<typename length_type >
Initializes lengths with SplineBase::SegLength method.
86 length += SegLength(i);
LengthArray lengths
Definition: Spline.h:142
length_type length() const
Definition: Spline.h:199
int index_type
Definition: Spline.h:31
index_type index_lo
Definition: Spline.h:46
index_type index_hi
Definition: Spline.h:47
template<typename length_type>
template<class T >
Initializes lengths in some custom way Note that value returned by cacher must be greater or equal to previous value.
184 length_type prev_length = 0, new_length = 0;
187 new_length = cacher(*
this, i);
193 ASSERT(prev_length <= new_length);
194 prev_length = new_length;
T max(const T &x, const T &y)
Definition: g3dmath.h:320
LengthArray lengths
Definition: Spline.h:142
int index_type
Definition: Spline.h:31
index_type index_lo
Definition: Spline.h:46
index_type index_hi
Definition: Spline.h:47
#define ASSERT
Definition: Errors.h:55
template<typename length_type>
Returns length of the whole spline.
LengthArray lengths
Definition: Spline.h:142
index_type index_hi
Definition: Spline.h:47
template<typename length_type>
Returns length between given nodes.
LengthArray lengths
Definition: Spline.h:142
template<typename length_type>
LengthArray lengths
Definition: Spline.h:142
template<typename length_type>
LengthArray lengths
Definition: Spline.h:142
length_type length() const
Definition: Spline.h:199
template<typename length_type>
The documentation for this class was generated from the following files: