|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <Spline.h>
Public Types | |
| typedef std::vector< Vector3 > | ControlArray |
| enum | EvaluationMode { ModeLinear , ModeCatmullrom , ModeBezier3_Unused , UninitializedMode , ModesEnd } |
| typedef int | index_type |
Public Member Functions | |
| 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 Types | |
| 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 |
Protected Member Functions | |
| 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 | |
| bool | cyclic |
| index_type | index_hi |
| index_type | index_lo |
| uint8 | m_mode |
| ControlArray | points |
Static Protected Attributes | |
| static EvaluationMethtod | derivative_evaluators [ModesEnd] |
| static EvaluationMethtod | evaluators [ModesEnd] |
| static InitMethtod | initializers [ModesEnd] |
| static SegLenghtMethtod | seglengths [ModesEnd] |
| typedef std::vector<Vector3> Movement::SplineBase::ControlArray |
|
protected |
| typedef int Movement::SplineBase::index_type |
|
protected |
|
protected |
|
inlineexplicit |
| void Movement::SplineBase::clear | ( | ) |
Definition at line 271 of file Spline.cpp.
References index_hi, index_lo, and points.
Referenced by Movement::Spline< length_type >::clear().
|
inline |
|
inline |
Caclulates derivation in index Idx, and percent of segment length t
| Idx | - spline segment index, should be in range [first, last) |
| t | - percent of spline segment length, assumes that t in range [0, 1] |
Definition at line 87 of file Spline.h.
References m_mode.
Referenced by Movement::Spline< double >::evaluate_derivative().
|
inline |
Caclulates the position for given segment Idx, and percent of segment length t
| t | - percent of segment length, assumes that t in range [0, 1] |
| Idx | - spline segment index, should be in range [first, last) |
Definition at line 81 of file Spline.h.
References m_mode.
Referenced by Movement::Spline< double >::evaluate_percent().
|
protected |
Definition at line 114 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate(), index_hi, index_lo, points, and Movement::s_Bezier3Coeffs().
|
protected |
Definition at line 108 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate(), index_hi, index_lo, points, and Movement::s_catmullRomCoeffs().
|
protected |
Definition at line 133 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate_Derivative(), index_hi, index_lo, points, and Movement::s_Bezier3Coeffs().
|
protected |
Definition at line 127 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate_Derivative(), index_hi, index_lo, points, and Movement::s_catmullRomCoeffs().
|
protected |
|
protected |
|
inline |
Bounds for spline indexes. All indexes should be in range [first, last).
Definition at line 90 of file Spline.h.
References index_lo.
Referenced by Movement::Spline< double >::length(), and Movement::PacketBuilder::WriteMonsterMove().
|
inline |
Definition at line 99 of file Spline.h.
References points.
Referenced by Movement::FallInitializer::operator()(), Movement::WriteLinearPath(), Movement::PacketBuilder::WriteMonsterMove(), Movement::WriteUncompressedCyclicPath(), and Movement::WriteUncompressedPath().
|
inline |
Definition at line 98 of file Spline.h.
References points.
Referenced by Movement::WriteLinearPath(), Movement::PacketBuilder::WriteMonsterMove(), Movement::WriteUncompressedCyclicPath(), and Movement::WriteUncompressedPath().
|
inline |
| void Movement::SplineBase::init_cyclic_spline | ( | const Vector3 * | controls, |
| index_type | count, | ||
| EvaluationMode | m, | ||
| index_type | cyclic_point ) |
Definition at line 197 of file Spline.cpp.
References cyclic, initializers, and m_mode.
Referenced by Movement::Spline< double >::init_cyclic_spline().
| void Movement::SplineBase::init_spline | ( | const Vector3 * | controls, |
| index_type | count, | ||
| EvaluationMode | m ) |
Initializes spline. Don't call other methods while spline not initialized.
Definition at line 189 of file Spline.cpp.
References cyclic, initializers, and m_mode.
Referenced by Movement::Spline< double >::init_spline().
|
inline |
|
protected |
Definition at line 258 of file Spline.cpp.
|
protected |
|
protected |
|
inline |
|
inline |
Definition at line 91 of file Spline.h.
References index_hi.
Referenced by TransportMgr::GeneratePath(), and Movement::Spline< double >::length().
|
inline |
Definition at line 94 of file Spline.h.
References m_mode.
Referenced by ToString(), and Movement::PacketBuilder::WriteCreateBits().
|
inline |
Calculates distance between [i; i+1] points, assumes that index i is in bounds.
Definition at line 115 of file Spline.h.
References m_mode.
Referenced by Movement::Spline< length_type >::initLengths(), and Movement::CommonInitializer::operator()().
|
protected |
Definition at line 166 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate(), index_hi, index_lo, points, Movement::s_Bezier3Coeffs(), and STEPS_PER_SEGMENT.
|
protected |
Definition at line 146 of file Spline.cpp.
References ASSERT, Movement::C_Evaluate(), index_hi, index_lo, points, Movement::s_catmullRomCoeffs(), and STEPS_PER_SEGMENT.
|
protected |
| std::string Movement::SplineBase::ToString | ( | ) | const |
Definition at line 278 of file Spline.cpp.
|
inlineprotected |
|
protected |
Definition at line 37 of file Spline.h.
Referenced by init_cyclic_spline(), init_spline(), init_spline(), InitCatmullRom(), InitLinear(), isCyclic(), and SplineBase().
|
staticprotected |
|
staticprotected |
|
protected |
Definition at line 34 of file Spline.h.
Referenced by clear(), Movement::Spline< length_type >::computeIndex(), Movement::Spline< length_type >::computeIndexInBounds(), empty(), EvaluateBezier3(), EvaluateCatmullRom(), EvaluateDerivativeBezier3(), EvaluateDerivativeCatmullRom(), EvaluateDerivativeLinear(), EvaluateLinear(), init_spline(), InitBezier3(), InitCatmullRom(), Movement::Spline< length_type >::initLengths(), Movement::Spline< double >::initLengths(), InitLinear(), last(), Movement::Spline< double >::length(), SegLengthBezier3(), SegLengthCatmullRom(), SegLengthLinear(), and SplineBase().
|
protected |
Definition at line 33 of file Spline.h.
Referenced by clear(), Movement::Spline< length_type >::computeIndexInBounds(), empty(), EvaluateBezier3(), EvaluateCatmullRom(), EvaluateDerivativeBezier3(), EvaluateDerivativeCatmullRom(), EvaluateDerivativeLinear(), EvaluateLinear(), first(), init_spline(), InitBezier3(), InitCatmullRom(), Movement::Spline< length_type >::initLengths(), Movement::Spline< double >::initLengths(), InitLinear(), SegLengthBezier3(), SegLengthCatmullRom(), SegLengthLinear(), and SplineBase().
|
staticprotected |
Definition at line 70 of file Spline.h.
Referenced by init_cyclic_spline(), and init_spline().
|
protected |
Definition at line 36 of file Spline.h.
Referenced by evaluate_derivative(), evaluate_percent(), init_cyclic_spline(), init_spline(), init_spline(), mode(), SegLength(), and SplineBase().
|
protected |
Definition at line 31 of file Spline.h.
Referenced by clear(), EvaluateBezier3(), EvaluateCatmullRom(), EvaluateDerivativeBezier3(), EvaluateDerivativeCatmullRom(), EvaluateDerivativeLinear(), EvaluateLinear(), getPoint(), getPointCount(), getPoints(), init_spline(), InitBezier3(), InitCatmullRom(), InitLinear(), SegLengthBezier3(), SegLengthCatmullRom(), SegLengthLinear(), and ToString().
|
staticprotected |