NSMath::NSCurves::THermiteCubic Struct Reference

THermiteCubic class. More...

#include <HermiteCubic.h>

Inheritance diagram for NSMath::NSCurves::THermiteCubic:

Inheritance graph
[legend]
Collaboration diagram for NSMath::NSCurves::THermiteCubic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 THermiteCubic (const THermiteCubic &orig)
 Copy constructor.
 THermiteCubic (const TVector3 &start, const TVector3 &p1, const TVector3 &p2, const TVector3 &end)
 Creates cubic from FOUR POINTS!!!
 THermiteCubic (const TVector3 &start, const TVector3 &startTangent, const TVector3 &endTangent, const TVector3 &end, bool)
 Creates cubic from two end-points and from their tangent vectors.
 ~THermiteCubic (void)
 Destructor.
TVector3GetStart (void)
 Return start point.
const TVector3GetStart (void) const
 Return start point.
TVector3GetEnd (void)
 Return end point.
const TVector3GetEnd (void) const
 Return end point.
TVector3GetStartTangent (void)
 Return tangent vector of start point.
const TVector3GetStartTangent (void) const
 Return tangent vector of start point.
TVector3GetEndTangent (void)
 Return tangent vector of end point.
const TVector3GetEndTangent (void) const
 Return tangent vector of end point.
TVector3GetVector (const DWORD &index)
 Return specified item from this cubic.
const TVector3GetVector (const DWORD &index) const
 Return specified item from this cubic.
void Set (const THermiteCubic &cub)
 Copy another cubic to this one.
void SetPoints (const TVector3 &start, const TVector3 &p1, const TVector3 &p2, const TVector3 &end)
 Sets cubic from FOUR POINTS!!!
void SetPointsTangents (const TVector3 &start, const TVector3 &startTangent, const TVector3 &endTangent, const TVector3 &end)
 Sets cubic from two end-points and from their tangent vectors.
void Move (const TVector3 &vec)
 Move this cubic about specified vector.
void Add (const TVector3 &vec)
 Add specified vector to this cubic (this move with cubic).
void Sub (const TVector3 &vec)
 Substract specified vector from this cubic (this move with cubic).
THermiteCubic Plus (const TVector3 &vec)
 Add vector to this cubic and return new one.
void Plus (const TVector3 &vec, THermiteCubic &res)
 Add vector to this cubic and result store in second parameter.
THermiteCubic Minus (const TVector3 &vec)
 Substract vector from this cubic and return new one.
void Minus (const TVector3 &vec, THermiteCubic &res)
 Substract vector from this cubic and result store in second parameter.
BOOL Compare (const THermiteCubic &cub) const
 Compare this cubic with another one with default tolerance TVector3::DELTA_COMPARE.
BOOL Compare (const THermiteCubic &cub, const float &delta) const
 Compare this cubic with another one with given tolerance.
BOOL ComparePrecise (const THermiteCubic &cub) const
 This method compare two Hermite cubics very precisly (bit comparing).
TVector3 GetValue (const float &t) const
 This method returns value at sepcified point of cubic.
void GetValue (const float &t, TVector3 &res) const
 This method store value at specified point of cubic into second parameter.
TVector3 GetFirstDerivateValue (const float &t) const
 This method return first derivation of Hermite cubic at specified point.
void GetFirstDerivateValue (const float &t, TVector3 &res) const
 This method store first derivation of Hermite cubic at specified point into second parameter.
TVector3 GetSecondDerivateValue (const float &t) const
 This method return second derivation of Hermite cubic at specified point.
void GetSecondDerivateValue (const float &t, TVector3 &res) const
 This method store second derivation of Hermite cubic at specified point into second parameter.
THermiteCubicoperator= (const THermiteCubic &orig)
 Assignment operator.
BOOL operator== (const THermiteCubic &cub) const
 Compare two cubics with default tolerance TVector3::DELTA_COMPARE.
TVector3operator[] (const DWORD &index)
 Return specified item from this cubic.
const TVector3operator[] (const DWORD &index) const
 Return specified item from this cubic.
THermiteCubicoperator+= (const TVector3 &vec)
 Add vector to this cubic (this move this cubic).
THermiteCubicoperator-= (const TVector3 &vec)
 Substract vector from this cubic (this move this cubic).
THermiteCubic operator+ (const TVector3 &vec)
 Add vector to this cubic and return new (moved) cubic.
THermiteCubic operator- (const TVector3 &vec)
 Substract vector from this cubic and return new (moved) cubic.

Detailed Description

THermiteCubic class.

Represents Hermite cubic. It's composed from four points - [START, P1, P2, END]. It starts in point START and continue in direction of vector [P1 - START]. From second end cubic starts in point END and continue in direction of vector [P2 - END].

There exists two types of constructor - one constructs cubic from four points and second from two points and two tangents!!!

Definition at line 41 of file HermiteCubic.h.


Constructor & Destructor Documentation

THermiteCubic::THermiteCubic const THermiteCubic orig  )  [inline]
 

Copy constructor.

Parameters:
orig [in] original constructor

Definition at line 134 of file HermiteCubic.h.

Referenced by Minus(), and Plus().

THermiteCubic::THermiteCubic const TVector3 start,
const TVector3 p1,
const TVector3 p2,
const TVector3 end
[inline]
 

Creates cubic from FOUR POINTS!!!

Parameters:
start [in] first (start) point
p1 [in] second point (P1-START determine start's tangent vector)
p2 [in] third point (END-P2 determine end's tangent vector)
end [in] fourth (end) point

Definition at line 149 of file HermiteCubic.h.

THermiteCubic::THermiteCubic const TVector3 start,
const TVector3 startTangent,
const TVector3 endTangent,
const TVector3 end,
bool 
[inline]
 

Creates cubic from two end-points and from their tangent vectors.

Parameters:
start [in] start point
startTangent [in] tangent vector of start point
endTangent [in] tangent vector of end point (END - P2 !!!)
end [in] end point

Definition at line 164 of file HermiteCubic.h.

THermiteCubic::~THermiteCubic void   )  [inline]
 

Destructor.

Definition at line 174 of file HermiteCubic.h.


Member Function Documentation

void THermiteCubic::Add const TVector3 vec  )  [inline]
 

Add specified vector to this cubic (this move with cubic).

Parameters:
vec [in] vector that will be added to endpoints

Definition at line 318 of file HermiteCubic.h.

Referenced by operator+=().

BOOL THermiteCubic::Compare const THermiteCubic cub,
const float &  delta
const [inline]
 

Compare this cubic with another one with given tolerance.

Parameters:
cub [in] second cubic to compare
delta [in] maximal allowed difference between values

Definition at line 398 of file HermiteCubic.h.

References NSMath::TVector3::Compare(), m_end, m_endTangent, m_start, and m_startTangent.

Here is the call graph for this function:

BOOL THermiteCubic::Compare const THermiteCubic cub  )  const [inline]
 

Compare this cubic with another one with default tolerance TVector3::DELTA_COMPARE.

Parameters:
cub [in] second cubic to compare

Definition at line 384 of file HermiteCubic.h.

References m_end, m_endTangent, m_start, and m_startTangent.

Referenced by operator==().

BOOL THermiteCubic::ComparePrecise const THermiteCubic cub  )  const [inline]
 

This method compare two Hermite cubics very precisly (bit comparing).

Parameters:
cub [in] second cubic to compare

Definition at line 411 of file HermiteCubic.h.

References NSMath::TVector3::ComparePrecise(), m_end, m_endTangent, m_start, and m_startTangent.

Here is the call graph for this function:

const TVector3 & THermiteCubic::GetEnd void   )  const [inline]
 

Return end point.

Definition at line 203 of file HermiteCubic.h.

TVector3 & THermiteCubic::GetEnd void   )  [inline]
 

Return end point.

Definition at line 196 of file HermiteCubic.h.

const TVector3 & THermiteCubic::GetEndTangent void   )  const [inline]
 

Return tangent vector of end point.

Definition at line 231 of file HermiteCubic.h.

TVector3 & THermiteCubic::GetEndTangent void   )  [inline]
 

Return tangent vector of end point.

Definition at line 224 of file HermiteCubic.h.

void THermiteCubic::GetFirstDerivateValue const float &  t,
TVector3 res
const
 

This method store first derivation of Hermite cubic at specified point into second parameter.

Parameters:
t [in] parameter in range <0,1>
res [in] vector to store first derivation

Definition at line 87 of file HermiteCubic.cpp.

References DBGASSERT, NSMath::NSStdMath::fabs(), and NSMath::TVector3::Set().

Here is the call graph for this function:

TVector3 THermiteCubic::GetFirstDerivateValue const float &  t  )  const
 

This method return first derivation of Hermite cubic at specified point.

Parameters:
t [in] parameter in range <0,1>

Definition at line 66 of file HermiteCubic.cpp.

References DBGASSERT, and NSMath::NSStdMath::fabs().

Here is the call graph for this function:

void THermiteCubic::GetSecondDerivateValue const float &  t,
TVector3 res
const
 

This method store second derivation of Hermite cubic at specified point into second parameter.

Parameters:
t [in] parameter in range <0,1>
res [in] vector to store first derivation

Definition at line 126 of file HermiteCubic.cpp.

References DBGASSERT, NSMath::NSStdMath::fabs(), and NSMath::TVector3::Set().

Here is the call graph for this function:

TVector3 THermiteCubic::GetSecondDerivateValue const float &  t  )  const
 

This method return second derivation of Hermite cubic at specified point.

Parameters:
t [in] parameter in range <0,1>

Definition at line 107 of file HermiteCubic.cpp.

References DBGASSERT, and NSMath::NSStdMath::fabs().

Here is the call graph for this function:

const TVector3 & THermiteCubic::GetStart void   )  const [inline]
 

Return start point.

Definition at line 189 of file HermiteCubic.h.

TVector3 & THermiteCubic::GetStart void   )  [inline]
 

Return start point.

Definition at line 182 of file HermiteCubic.h.

const TVector3 & THermiteCubic::GetStartTangent void   )  const [inline]
 

Return tangent vector of start point.

Definition at line 217 of file HermiteCubic.h.

TVector3 & THermiteCubic::GetStartTangent void   )  [inline]
 

Return tangent vector of start point.

Definition at line 210 of file HermiteCubic.h.

void THermiteCubic::GetValue const float &  t,
TVector3 res
const
 

This method store value at specified point of cubic into second parameter.

Point is determined with interval t = <0,1>.

Parameters:
t [in] determines position of point on cubic in range <0,1>
res [out] vector to store result

Definition at line 44 of file HermiteCubic.cpp.

References DBGASSERT, NSMath::NSStdMath::fabs(), and NSMath::TVector3::Set().

Here is the call graph for this function:

TVector3 THermiteCubic::GetValue const float &  t  )  const
 

This method returns value at sepcified point of cubic.

Point is determined with interval t = <0,1>.

Parameters:
t [in] determines position of point on cubic in range <0,1>

Definition at line 20 of file HermiteCubic.cpp.

References DBGASSERT, and NSMath::NSStdMath::fabs().

Here is the call graph for this function:

const TVector3 & THermiteCubic::GetVector const DWORD index  )  const [inline]
 

Return specified item from this cubic.

Index must be in range 0..3. Returned items are START, START_TANGENT, END_TANGENT, END.

Parameters:
index [in] index in range 0..3

Definition at line 253 of file HermiteCubic.h.

References DBGASSERT.

TVector3 & THermiteCubic::GetVector const DWORD index  )  [inline]
 

Return specified item from this cubic.

Index must be in range 0..3. Returned items are START, START_TANGENT, END_TANGENT, END.

Parameters:
index [in] index in range 0..3

Definition at line 241 of file HermiteCubic.h.

References DBGASSERT.

Referenced by operator[]().

void THermiteCubic::Minus const TVector3 vec,
THermiteCubic res
[inline]
 

Substract vector from this cubic and result store in second parameter.

Parameters:
vec [in] vector that will be added to endpoints
res [in] cubic to store result

Definition at line 371 of file HermiteCubic.h.

References m_end, m_endTangent, m_start, and m_startTangent.

THermiteCubic THermiteCubic::Minus const TVector3 vec  )  [inline]
 

Substract vector from this cubic and return new one.

Parameters:
vec [in] vector that will be added to endpoints

Definition at line 361 of file HermiteCubic.h.

References THermiteCubic().

Referenced by operator-().

Here is the call graph for this function:

void THermiteCubic::Move const TVector3 vec  )  [inline]
 

Move this cubic about specified vector.

Parameters:
vec [in] vector that determines move offset

Definition at line 308 of file HermiteCubic.h.

THermiteCubic THermiteCubic::operator+ const TVector3 vec  )  [inline]
 

Add vector to this cubic and return new (moved) cubic.

Parameters:
vec [in] vector which determines offset

Definition at line 488 of file HermiteCubic.h.

References Plus().

Here is the call graph for this function:

THermiteCubic & THermiteCubic::operator+= const TVector3 vec  )  [inline]
 

Add vector to this cubic (this move this cubic).

Parameters:
vec [in] vector which determines offset

Definition at line 466 of file HermiteCubic.h.

References Add().

Here is the call graph for this function:

THermiteCubic THermiteCubic::operator- const TVector3 vec  )  [inline]
 

Substract vector from this cubic and return new (moved) cubic.

Parameters:
vec [in] vector which determines offset

Definition at line 497 of file HermiteCubic.h.

References Minus().

Here is the call graph for this function:

THermiteCubic & THermiteCubic::operator-= const TVector3 vec  )  [inline]
 

Substract vector from this cubic (this move this cubic).

Parameters:
vec [in] vector which determines offset

Definition at line 477 of file HermiteCubic.h.

References Sub().

Here is the call graph for this function:

THermiteCubic & THermiteCubic::operator= const THermiteCubic orig  )  [inline]
 

Assignment operator.

Parameters:
orig [in] original cubic

Definition at line 426 of file HermiteCubic.h.

References Set().

Here is the call graph for this function:

BOOL THermiteCubic::operator== const THermiteCubic cub  )  const [inline]
 

Compare two cubics with default tolerance TVector3::DELTA_COMPARE.

Parameters:
cub [in] second cubic to compare

Definition at line 437 of file HermiteCubic.h.

References Compare().

Here is the call graph for this function:

const TVector3 & THermiteCubic::operator[] const DWORD index  )  const [inline]
 

Return specified item from this cubic.

Index must be in range 0..3. Returned items are START, START_TANGENT, END_TANGENT, END.

Parameters:
index [in] index in range 0..3

Definition at line 457 of file HermiteCubic.h.

References GetVector().

Here is the call graph for this function:

TVector3 & THermiteCubic::operator[] const DWORD index  )  [inline]
 

Return specified item from this cubic.

Index must be in range 0..3. Returned items are START, START_TANGENT, END_TANGENT, END.

Parameters:
index [in] index in range 0..3

Definition at line 447 of file HermiteCubic.h.

References GetVector().

Here is the call graph for this function:

void THermiteCubic::Plus const TVector3 vec,
THermiteCubic res
[inline]
 

Add vector to this cubic and result store in second parameter.

Parameters:
vec [in] vector that will be added to endpoints
res [in] cubic to store result

Definition at line 348 of file HermiteCubic.h.

References m_end, m_endTangent, m_start, and m_startTangent.

THermiteCubic THermiteCubic::Plus const TVector3 vec  )  [inline]
 

Add vector to this cubic and return new one.

Parameters:
vec [in] vector that will be added to endpoints

Definition at line 338 of file HermiteCubic.h.

References THermiteCubic().

Referenced by operator+().

Here is the call graph for this function:

void THermiteCubic::Set const THermiteCubic cub  )  [inline]
 

Copy another cubic to this one.

Parameters:
cub [in] original cubic

Definition at line 266 of file HermiteCubic.h.

References m_end, m_endTangent, m_start, and m_startTangent.

Referenced by operator=().

void THermiteCubic::SetPoints const TVector3 start,
const TVector3 p1,
const TVector3 p2,
const TVector3 end
[inline]
 

Sets cubic from FOUR POINTS!!!

Parameters:
start [in] first (start) point
p1 [in] second point (P1-START determine start's tangent vector)
p2 [in] third point (END-P2 determine end's tangent vector)
end [in] fourth (end) point

Definition at line 281 of file HermiteCubic.h.

void THermiteCubic::SetPointsTangents const TVector3 start,
const TVector3 startTangent,
const TVector3 endTangent,
const TVector3 end
[inline]
 

Sets cubic from two end-points and from their tangent vectors.

Parameters:
start [in] start point
startTangent [in] tangent vector of start point
endTangent [in] tangent vector of end point (END-P2)
end [in] end point

Definition at line 296 of file HermiteCubic.h.

void THermiteCubic::Sub const TVector3 vec  )  [inline]
 

Substract specified vector from this cubic (this move with cubic).

Parameters:
vec [in] vector that will be substracted from endpoints

Definition at line 328 of file HermiteCubic.h.

Referenced by operator-=().


The documentation for this struct was generated from the following files:
Generated on Wed Nov 28 23:07:28 2007 for Joy4D by  doxygen 1.4.6-NO