|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <Spline.h>
Public Types | |
| typedef std::vector< length_type > | LengthArray |
| typedef length_type | LengthType |
| Public Types inherited from Movement::SplineBase | |
| typedef std::vector< Vector3 > | ControlArray |
| enum | EvaluationMode { ModeLinear , ModeCatmullrom , ModeBezier3_Unused , UninitializedMode , ModesEnd } |
| typedef int | index_type |
Public Member Functions | |
| void | clear () |
| void | computeIndex (float t, index_type &out_idx, float &out_u) const |
| index_type | computeIndexInBounds (float t) const |
| void | evaluate_derivative (float t, Vector3 &hermite) const |
| void | evaluate_derivative (index_type Idx, float u, Vector3 &c) const |
| void | evaluate_percent (float t, Vector3 &c) const |
| void | evaluate_percent (index_type Idx, float u, Vector3 &c) const |
| void | init_cyclic_spline (const Vector3 *controls, index_type count, EvaluationMode m, index_type cyclic_point) |
| void | init_spline (const Vector3 *controls, index_type count, EvaluationMode m) |
| 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) |
| Spline () | |
| Public Member Functions inherited from Movement::SplineBase | |
| void | clear () |
| bool | empty () const |
| void | evaluate_derivative (index_type Idx, float u, Vector3 &hermite) const |
| void | evaluate_percent (index_type Idx, float u, Vector3 &c) const |
| index_type | first () const |
| const Vector3 & | getPoint (index_type i) const |
| index_type | getPointCount () const |
| const ControlArray & | getPoints () const |
| void | init_cyclic_spline (const Vector3 *controls, index_type count, EvaluationMode m, index_type cyclic_point) |
| void | init_spline (const Vector3 *controls, index_type count, EvaluationMode m) |
| template<class Init> | |
| void | init_spline (Init &initializer) |
| bool | isCyclic () const |
| index_type | last () const |
| EvaluationMode | mode () const |
| float | SegLength (index_type i) const |
| SplineBase () | |
| std::string | ToString () const |
Protected Member Functions | |
| index_type | computeIndexInBounds (length_type length) const |
| Protected Member Functions inherited from Movement::SplineBase | |
| void | EvaluateBezier3 (index_type, float, Vector3 &) const |
| void | EvaluateCatmullRom (index_type, float, Vector3 &) const |
| void | EvaluateDerivativeBezier3 (index_type, float, Vector3 &) const |
| void | EvaluateDerivativeCatmullRom (index_type, float, Vector3 &) const |
| void | EvaluateDerivativeLinear (index_type, float, Vector3 &) const |
| void | EvaluateLinear (index_type, float, Vector3 &) const |
| void | InitBezier3 (const Vector3 *, index_type, bool, index_type) |
| void | InitCatmullRom (const Vector3 *, index_type, bool, index_type) |
| void | InitLinear (const Vector3 *, index_type, bool, index_type) |
| float | SegLengthBezier3 (index_type) const |
| float | SegLengthCatmullRom (index_type) const |
| float | SegLengthLinear (index_type) const |
| void | UninitializedSpline () const |
Protected Attributes | |
| LengthArray | lengths |
| Protected Attributes inherited from Movement::SplineBase | |
| bool | cyclic |
| index_type | index_hi |
| index_type | index_lo |
| uint8 | m_mode |
| ControlArray | points |
Additional Inherited Members | |
| Protected Types inherited from Movement::SplineBase | |
| enum | { STEPS_PER_SEGMENT = 3 } |
| typedef void(SplineBase::* | EvaluationMethtod) (index_type, float, Vector3 &) const |
| typedef void(SplineBase::* | InitMethtod) (const Vector3 *, index_type, bool, index_type) |
| typedef float(SplineBase::* | SegLenghtMethtod) (index_type) const |
| Static Protected Attributes inherited from Movement::SplineBase | |
| static EvaluationMethtod | derivative_evaluators [ModesEnd] |
| static EvaluationMethtod | evaluators [ModesEnd] |
| static InitMethtod | initializers [ModesEnd] |
| static SegLenghtMethtod | seglengths [ModesEnd] |
| typedef std::vector<length_type> Movement::Spline< length_type >::LengthArray |
| typedef length_type Movement::Spline< length_type >::LengthType |
|
inlineexplicit |
| void Movement::Spline< length_type >::clear | ( | ) |
Definition at line 78 of file SplineImpl.h.
References Movement::SplineBase::clear(), and lengths.
| void Movement::Spline< length_type >::computeIndex | ( | float | t, |
| index_type & | out_idx, | ||
| float & | out_u ) const |
Definition at line 51 of file SplineImpl.h.
References ASSERT, computeIndexInBounds(), Movement::SplineBase::index_hi, and length().
Referenced by evaluate_derivative(), and evaluate_percent().
| SplineBase::index_type Movement::Spline< length_type >::computeIndexInBounds | ( | float | t | ) | const |
Definition at line 60 of file SplineImpl.h.
References ASSERT, computeIndexInBounds(), and length().
|
protected |
Definition at line 24 of file SplineImpl.h.
References Movement::SplineBase::index_hi, Movement::SplineBase::index_lo, and lengths.
Referenced by computeIndex(), and computeIndexInBounds().
| void Movement::Spline< length_type >::evaluate_derivative | ( | float | t, |
| Vector3 & | hermite ) const |
Calculates derivation for given t
| t | - percent of spline's length, assumes that t in range [0, 1]. |
Definition at line 16 of file SplineImpl.h.
References computeIndex(), and evaluate_derivative().
Referenced by evaluate_derivative().
|
inline |
| void Movement::Spline< length_type >::evaluate_percent | ( | float | t, |
| Vector3 & | c ) const |
Calculates the position for given t
| t | - percent of spline's length, assumes that t in range [0, 1]. |
Definition at line 8 of file SplineImpl.h.
References computeIndex(), and evaluate_percent().
Referenced by evaluate_percent().
|
inline |
|
inline |
Definition at line 158 of file Spline.h.
Referenced by TransportMgr::GeneratePath().
|
inline |
Initializes spline. Don't call other methods while spline not initialized.
Definition at line 157 of file Spline.h.
Referenced by TransportMgr::GeneratePath().
| void Movement::Spline< length_type >::initLengths | ( | ) |
Initializes lengths with SplineBase::SegLength method.
Definition at line 66 of file SplineImpl.h.
References Movement::SplineBase::index_hi, Movement::SplineBase::index_lo, length(), lengths, and Movement::SplineBase::SegLength().
Referenced by TransportMgr::GeneratePath().
|
inline |
|
inline |
Returns length of the whole spline.
Definition at line 184 of file Spline.h.
Referenced by computeIndex(), computeIndexInBounds(), TransportMgr::GeneratePath(), and initLengths().
|
inline |
|
inline |
|
inline |
|
protected |
Definition at line 128 of file Spline.h.
Referenced by clear(), computeIndexInBounds(), and initLengths().