#include <HermiteCubicSpline.h>
Inheritance diagram for NSMath::NSCurves::THermiteCubicSpline:
Public Member Functions | |
THermiteCubicSpline (void) | |
Creates initialized Hermite spline with no points. | |
THermiteCubicSpline (const THermiteCubicSpline &orig) | |
Copy constructor. | |
~THermiteCubicSpline (void) | |
Destructor. | |
DWORD | GetPointCount (void) const |
Returns number of points on spline. | |
float | GetLength (void) const |
Returns "length" of spline. | |
const TVector3 & | GetPoint (const DWORD &index) const |
Return point at specified index. | |
const TVector3 & | GetTangent (const DWORD &index) const |
Return tangent vector for point at specified index. | |
const TVector3 & | GetPointByTime (const float &t) const |
Return point which is nearest point to the point specified by parameter. | |
DWORD | GetIndexByTime (const float &t) const |
Return index of point which is nearest point to the point specified by parameter. | |
const TVector3 & | GetPointByUniformTime (const float &t) const |
Return point which is nearest point to the point specified by parameter. | |
DWORD | GetIndexByUniformTime (const float &t) const |
Return index of point which is left-closest point to the point specified by parameter. | |
void | Set (const THermiteCubicSpline &spline) |
Set another Hermite spline to this spline. | |
void | AddPoint (const TVector3 &pt, const TVector3 &tangent) |
Add next point to this spline. | |
void | MovePoint (const DWORD &index, const TVector3 &pt) |
This method moves with specified point at given index about specified vector. | |
void | ChangeTangent (const DWORD &index, const TVector3 &tangent) |
Change tangent vector for specified point. | |
void | Move (const TVector3 &vec) |
Move with entire spline about specified vector. | |
void | Add (const TVector3 &vec) |
Add specified vector to each point of this spline. | |
void | Sub (const TVector3 &vec) |
Substract specified vector from each point of this spline. | |
TVector3 | GetValue (const float &t) const |
Get value of spline at given time value in denormalized format. | |
void | GetValue (const float &t, TVector3 &res) const |
Get value of spline at given time value in denormalized format and result store in second operand. | |
TVector3 | GetValueUniform (const float &t) const |
Get value of spline at given time value in normalized format. | |
void | GetValueUniform (const float &t, TVector3 &res) const |
Get value of spline at given time value in normalized format and result store in second operand. | |
TVector3 | GetFirstDerivateValue (const float &t) const |
Return first derivation at given denormalized time. | |
void | GetFirstDerivateValue (const float &t, TVector3 &res) const |
Compute first derivation at given denormalized time and result store in second parameter. | |
TVector3 | GetFirstDerivateValueUniform (const float &t) const |
Compute first derivation at given normalized time. | |
void | GetFirstDerivateValueUniform (const float &t, TVector3 &res) const |
Compute first derivation at given normalized time and result store in second parameter. | |
TVector3 | GetSecondDerivateValue (const float &t) const |
Compute second derivation at given denormalized time. | |
void | GetSecondDerivateValue (const float &t, TVector3 &res) const |
Compute second derivation at given denormalized time and result store in second parameter. | |
TVector3 | GetSecondDerivateValueUniform (const float &t) const |
Compute second derivation at given normalized time. | |
void | GetSecondDerivateValueUniform (const float &t, TVector3 &res) const |
Compute second derivation at given normalized time and result store in second parameter. | |
BOOL | Compare (const THermiteCubicSpline &spline) const |
Compare two Hermite cubic spline with default tolerance TVector3::DELTA_COMPARE. | |
BOOL | Compare (const THermiteCubicSpline &spline, const float &delta) const |
Compare two Hermite cubic spline with given tolerance. | |
BOOL | ComparePrecise (const THermiteCubicSpline &spline) const |
Compare two Hermite cubic spline very precisly. | |
THermiteCubicSpline & | operator= (const THermiteCubicSpline &orig) |
Assignment operator. | |
BOOL | operator== (const THermiteCubicSpline &spline) const |
Compare this spline with another spline with precision TVector3::DELTA_COMPARE. | |
TVector3 & | operator[] (const DWORD &index) |
Returns point at specified index. | |
const TVector3 & | operator[] (const DWORD &index) const |
Returns point at specified index. | |
THermiteCubicSpline & | operator+= (const TVector3 &vec) |
Add specified vector to each point of this spline - this move spline to new position. | |
THermiteCubicSpline & | operator-= (const TVector3 &vec) |
Substract specified vector from each point of this spline - this move spline to new position. |
This class define simple spline with Hermite interpolation. Spline is constructed from simple Hermite cubics via adding points to spline.
For example spline contains points P0, P1, P2, P3 etc. then <P0,P1> is one segment, <P1,P2> second segment and so on. Thus segments share one point (and its tangent), this sharing ensure consquential points have identical tangent vectors.
Definition at line 45 of file HermiteCubicSpline.h.
|
Creates initialized Hermite spline with no points.
Definition at line 124 of file HermiteCubicSpline.h. |
|
Copy constructor.
Definition at line 132 of file HermiteCubicSpline.h. |
|
Destructor.
Definition at line 140 of file HermiteCubicSpline.h. |
|
Add specified vector to each point of this spline. Result of operation is identical with THermiteCubicSpline::Move.
Definition at line 326 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Size(). Referenced by operator+=(). Here is the call graph for this function: ![]() |
|
Add next point to this spline. You must provide point and its tangent.
Definition at line 276 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::AddItem(), and NSMath::NSStdMath::tangent(). Here is the call graph for this function: ![]() |
|
Change tangent vector for specified point.
Definition at line 300 of file HermiteCubicSpline.h. References DBGASSERT, TArrayObjects< T, size, step >::Size(), and NSMath::NSStdMath::tangent(). Here is the call graph for this function: ![]() |
|
Compare two Hermite cubic spline with given tolerance. Both splines must have the same number of points and identical points and their tangent vectors.
Definition at line 625 of file HermiteCubicSpline.h. References FALSE, and GetPointCount(). Here is the call graph for this function: ![]() |
|
Compare two Hermite cubic spline with default tolerance TVector3::DELTA_COMPARE. Both splines must have the same number of points and identical points and their tangent vectors.
Definition at line 591 of file HermiteCubicSpline.h. References FALSE, and GetPointCount(). Referenced by operator==(). Here is the call graph for this function: ![]() |
|
Compare two Hermite cubic spline very precisly. Both splines must have the same number of points and identical points and their tangent vectors.
Definition at line 658 of file HermiteCubicSpline.h. References FALSE, and GetPointCount(). Here is the call graph for this function: ![]() |
|
Compute first derivation at given denormalized time and result store in second parameter.
Definition at line 456 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), DBGASSERT, GetLength(), and TArrayObjects< T, size, step >::Size(). Here is the call graph for this function: ![]() |
|
Return first derivation at given denormalized time.
Definition at line 442 of file HermiteCubicSpline.h. Referenced by GetFirstDerivateValueUniform(). |
|
Compute first derivation at given normalized time and result store in second parameter.
Definition at line 508 of file HermiteCubicSpline.h. References GetFirstDerivateValue(), and GetLength(). Here is the call graph for this function: ![]() |
|
Compute first derivation at given normalized time.
Definition at line 494 of file HermiteCubicSpline.h. |
|
Return index of point which is nearest point to the point specified by parameter. From parameter T is determined interval between two points <Pa,Pb> and method always returns point Pa (first point).
Definition at line 212 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), DBGASSERT, NSRoutines::FloatClamp(), and GetLength(). Referenced by GetPointByTime(). Here is the call graph for this function: ![]() |
|
Return index of point which is left-closest point to the point specified by parameter. From parameter T (here is T normalized!!!) is determined interval between two points <Pa,Pb> and method always returns point Pa (first point).
Definition at line 246 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), DBGASSERT, NSRoutines::FloatClampNormalize(), and GetLength(). Referenced by GetPointByUniformTime(). Here is the call graph for this function: ![]() |
|
Returns "length" of spline. Length is determined as (number of points - 1).
Definition at line 158 of file HermiteCubicSpline.h. References DBGASSERT, and TArrayObjects< T, size, step >::Size(). Referenced by GetFirstDerivateValue(), GetFirstDerivateValueUniform(), GetIndexByTime(), GetIndexByUniformTime(), GetSecondDerivateValue(), GetSecondDerivateValueUniform(), GetValue(), and GetValueUniform(). Here is the call graph for this function: ![]() |
|
Return point at specified index. Index must be in range!!!
Definition at line 170 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), and DBGASSERT. Here is the call graph for this function: ![]() |
|
Return point which is nearest point to the point specified by parameter. From parameter T is determined interval between two points <Pa,Pb> and method always returns point Pa (first point).
Definition at line 198 of file HermiteCubicSpline.h. References GetIndexByTime(). Here is the call graph for this function: ![]() |
|
Return point which is nearest point to the point specified by parameter. From parameter T (here is normalized) is determined interval between two points <Pa,Pb> and method always returns point Pa (first point).
Definition at line 232 of file HermiteCubicSpline.h. References GetIndexByUniformTime(). Here is the call graph for this function: ![]() |
|
Returns number of points on spline.
Definition at line 148 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(). Referenced by Compare(), ComparePrecise(), and operator[](). Here is the call graph for this function: ![]() |
|
Compute second derivation at given denormalized time and result store in second parameter.
Definition at line 531 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), DBGASSERT, GetLength(), and TArrayObjects< T, size, step >::Size(). Here is the call graph for this function: ![]() |
|
Compute second derivation at given denormalized time.
Definition at line 517 of file HermiteCubicSpline.h. Referenced by GetSecondDerivateValueUniform(). |
|
Compute second derivation at given normalized time and result store in second parameter.
Definition at line 581 of file HermiteCubicSpline.h. References GetLength(), and GetSecondDerivateValue(). Here is the call graph for this function: ![]() |
|
Compute second derivation at given normalized time.
Definition at line 567 of file HermiteCubicSpline.h. References GetSecondDerivateValue(). Here is the call graph for this function: ![]() |
|
Return tangent vector for point at specified index. Index must be in range!!!
Definition at line 182 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), and DBGASSERT. Here is the call graph for this function: ![]() |
|
Get value of spline at given time value in denormalized format and result store in second operand.
Definition at line 374 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Count(), DBGASSERT, GetLength(), and TArrayObjects< T, size, step >::Size(). Here is the call graph for this function: ![]() |
|
Get value of spline at given time value in denormalized format.
Definition at line 356 of file HermiteCubicSpline.h. Referenced by GetValueUniform(). |
|
Get value of spline at given time value in normalized format and result store in second operand.
Definition at line 430 of file HermiteCubicSpline.h. References DBGASSERT, GetLength(), and GetValue(). Here is the call graph for this function: ![]() |
|
Get value of spline at given time value in normalized format.
Definition at line 414 of file HermiteCubicSpline.h. References DBGASSERT, GetLength(), and GetValue(). Here is the call graph for this function: ![]() |
|
Move with entire spline about specified vector.
Definition at line 311 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Size(). Here is the call graph for this function: ![]() |
|
This method moves with specified point at given index about specified vector.
Definition at line 287 of file HermiteCubicSpline.h. References DBGASSERT, and TArrayObjects< T, size, step >::Size(). Here is the call graph for this function: ![]() |
|
Add specified vector to each point of this spline - this move spline to new position.
Definition at line 732 of file HermiteCubicSpline.h. References Add(). Here is the call graph for this function: ![]() |
|
Substract specified vector from each point of this spline - this move spline to new position.
Definition at line 743 of file HermiteCubicSpline.h. References Sub(). Here is the call graph for this function: ![]() |
|
Assignment operator.
Definition at line 692 of file HermiteCubicSpline.h. References Set(). Here is the call graph for this function: ![]() |
|
Compare this spline with another spline with precision TVector3::DELTA_COMPARE.
Definition at line 701 of file HermiteCubicSpline.h. References Compare(). Here is the call graph for this function: ![]() |
|
Returns point at specified index.
Definition at line 721 of file HermiteCubicSpline.h. References DBGASSERT, and GetPointCount(). Here is the call graph for this function: ![]() |
|
Returns point at specified index.
Definition at line 710 of file HermiteCubicSpline.h. References DBGASSERT, and GetPointCount(). Here is the call graph for this function: ![]() |
|
Set another Hermite spline to this spline.
Definition at line 260 of file HermiteCubicSpline.h. References m_points, m_tangents, and TArrayObjects< T, size, step >::Set(). Referenced by operator=(). Here is the call graph for this function: ![]() |
|
Substract specified vector from each point of this spline.
Definition at line 340 of file HermiteCubicSpline.h. References TArrayObjects< T, size, step >::Size(). Referenced by operator-=(). Here is the call graph for this function: ![]() |