Fovia's C++ Client/Server API
Public Member Functions | List of all members
IInterpolation Struct Referenceabstract
Inheritance diagram for IInterpolation:
IRoot

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int Bspline (double &ret, double prev, double start, double finish, double next, double delta)=0
 
virtual signed int CatmullRom3DDistance (double &ret, VECTOR3D prev, VECTOR3D start, VECTOR3D finish, VECTOR3D next, signed int numSteps)=0
 
virtual signed int Catrom (double &ret, double prev, double start, double finish, double next, double delta)=0
 
virtual signed int Catrom (signed long long &ret, signed long long prev, signed long long start, signed long long finish, signed long long next, double delta)=0
 
virtual signed int Catrom (float &ret, float prev, float start, float finish, float next, double delta)=0
 
virtual signed int Catrom (VECTOR3D &ret, VECTOR3D prev, VECTOR3D start, VECTOR3D finish, VECTOR3D next, double delta)=0
 
virtual signed int CatromConstantVelocity (VECTOR3D &ret, VECTOR3D prev, VECTOR3D start, VECTOR3D finish, VECTOR3D next, double delta)=0
 
virtual signed int DecRef ()=0
 
virtual signed int EaseIn (double &ret, double delta, double power)=0
 
virtual signed int EaseOut (double &ret, double delta, double power)=0
 
virtual signed int IncRef ()=0
 
virtual signed int Interpolate (RENDER_PARAMS &ret, RENDER_PARAMS &prev, RENDER_PARAMS &start, RENDER_PARAMS &finish, RENDER_PARAMS &next, double delta, signed int bCurved)=0
 
virtual signed int Lerp (double &ret, double start, double finish, double delta)=0
 
virtual signed int Lerp (double &ret, double prev, double start, double finish, double next, double delta)=0
 
virtual signed int Lerp (VECTOR3D &ret, VECTOR3D start, VECTOR3D finish, double delta)=0
 
virtual signed int Lerp (signed long long &ret, signed long long start, signed long long finish, double delta)=0
 
virtual signed int Lerp (signed int &ret, signed int start, signed int finish, double delta)=0
 
virtual signed int Lerp (float &ret, float start, float finish, double delta)=0
 
virtual signed int Lerp (COLOR_RGBA &ret, COLOR_RGBA &start, COLOR_RGBA &finish, double delta)=0
 
virtual signed int Lerp (CUT_PLANE_PARAMS &ret, CUT_PLANE_PARAMS &start, CUT_PLANE_PARAMS &finish, double delta)=0
 
virtual signed int Lerp (RENDER_RANGE_PARAMS &ret, RENDER_RANGE_PARAMS &start, RENDER_RANGE_PARAMS &finish, double delta)=0
 
virtual signed int LerpColor (signed int &ret, signed int start, signed int finish, double delta)=0
 
virtual signed int LerpOpacity (signed int &ret, signed int start, signed int finish, double delta)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

Utility object for interpolating the various data types in the SDK. Use ILibrary::CreateObject() to create this object.

Member Function Documentation

virtual signed int IInterpolation::AskInterface ( const BGUID piid,
IRoot **  ppr 
)
pure virtual

Queries this object to see if the interface piid is supported and returns the result in ppr.

Parameters
piidThe BGUID of the requested interface.
pprThe address of an IRoot pointer which will receive the new interface.
Returns
S_OK if the interface is supported. E_FAIL if it is not.

Implements IRoot.

virtual signed int IInterpolation::Bspline ( double &  ret,
double  prev,
double  start,
double  finish,
double  next,
double  delta 
)
pure virtual

Performs a B-Spline interpolation on data type double. Note that unlike Catmull-Rom, the interpolation points do NOT go through start and finish. Therefore, this is not suitable for interpolating a flythrough path through specific points.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then a point closer to start is returned. If delta is 1, then a point closer to finish is returned.
virtual signed int IInterpolation::CatmullRom3DDistance ( double &  ret,
VECTOR3D  prev,
VECTOR3D  start,
VECTOR3D  finish,
VECTOR3D  next,
signed int  numSteps 
)
pure virtual

Approximates the distance of the line created by Catmull-Rom interpolation.

Parameters
retThe approximate distance traveled by the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
numStepsThe number of steps to use in the summation process. More steps will take longer, but produce a more precise rsult.
virtual signed int IInterpolation::Catrom ( double &  ret,
double  prev,
double  start,
double  finish,
double  next,
double  delta 
)
pure virtual

Performs a Catmull-Rom interpolation on data type double.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Catrom ( signed long long &  ret,
signed long long  prev,
signed long long  start,
signed long long  finish,
signed long long  next,
double  delta 
)
pure virtual

Performs a Catmull-Rom interpolation on data type int.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Catrom ( float &  ret,
float  prev,
float  start,
float  finish,
float  next,
double  delta 
)
pure virtual

Performs a Catmull-Rom interpolation on data type float.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Catrom ( VECTOR3D ret,
VECTOR3D  prev,
VECTOR3D  start,
VECTOR3D  finish,
VECTOR3D  next,
double  delta 
)
pure virtual

Performs a Catmull-Rom interpolation on the members of VECTOR3D.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::CatromConstantVelocity ( VECTOR3D ret,
VECTOR3D  prev,
VECTOR3D  start,
VECTOR3D  finish,
VECTOR3D  next,
double  delta 
)
pure virtual

Performs a constant velocity Catmull-Rom interpolation on the members of VECTOR3D.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::DecRef ( )
pure virtual

Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.

Implements IRoot.

virtual signed int IInterpolation::EaseIn ( double &  ret,
double  delta,
double  power 
)
pure virtual

Modifies an interpolation coefficient to slow down to a stop at the end of the interpolation.

Parameters
retThe new interpolation coefficient.
deltaThe initial interpolation coefficient
powerThe exponent to use when calculating the curve for stopping. This should be a number greater than 1.
virtual signed int IInterpolation::EaseOut ( double &  ret,
double  delta,
double  power 
)
pure virtual

Modifies an interpolation coefficient to accelerate from a stop at the start of the interpolation.

Parameters
retThe new interpolation coefficient.
deltaThe initial interpolation coefficient
powerThe exponent to use when calculating the curve for accelerating. This should be a number greater than 1.
virtual signed int IInterpolation::IncRef ( )
pure virtual

Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.

Implements IRoot.

virtual signed int IInterpolation::Interpolate ( RENDER_PARAMS ret,
RENDER_PARAMS prev,
RENDER_PARAMS start,
RENDER_PARAMS finish,
RENDER_PARAMS next,
double  delta,
signed int  bCurved 
)
pure virtual

Interpolates between the specified RENDER_PARAMS with either curved interpolation or linear interpolation depending upon the value of bCurved.

Parameters
retThe result of the interpolation.
prevThe point before the start point of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
nextThe point after the finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
bCurvedDetermines how RENDER_PARAMS::Transform is interpolated. If true, orientation vectors are interpolated using spherical quadrangle interpolation and the offset vector is interpolated using a constant velocity Catmull-Rom interpolation. If false, orientation vectors are interpolated using spherical linear interpolation and offset vectors are interpolated using linear interpolation. All other parameters are interpolated using linear interpolation.
virtual signed int IInterpolation::Lerp ( double &  ret,
double  start,
double  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the data type double.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( double &  ret,
double  prev,
double  start,
double  finish,
double  next,
double  delta 
)
pure virtual

Utility overload that is functionally identical to #Lerp(h_float64&,h_float64,h_float64,h_float64). prev and next are ignored.

virtual signed int IInterpolation::Lerp ( VECTOR3D ret,
VECTOR3D  start,
VECTOR3D  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the members of the VECTOR3D data type.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( signed long long &  ret,
signed long long  start,
signed long long  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the data type h_int64.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( signed int &  ret,
signed int  start,
signed int  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the data type int.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( float &  ret,
float  start,
float  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the data type float.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( COLOR_RGBA ret,
COLOR_RGBA start,
COLOR_RGBA finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the members of the COLOR_RGBA data type.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( CUT_PLANE_PARAMS ret,
CUT_PLANE_PARAMS start,
CUT_PLANE_PARAMS finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the members of the data type CUT_PLANE_PARAMS.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::Lerp ( RENDER_RANGE_PARAMS ret,
RENDER_RANGE_PARAMS start,
RENDER_RANGE_PARAMS finish,
double  delta 
)
pure virtual

Performs a linear interpolation on the members of the data type RENDER_RANGE_PARAMS.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::LerpColor ( signed int &  ret,
signed int  start,
signed int  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on a color member in a COLORED_POINT.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.
virtual signed int IInterpolation::LerpOpacity ( signed int &  ret,
signed int  start,
signed int  finish,
double  delta 
)
pure virtual

Performs a linear interpolation on an opacity member in a COLORED_POINT.

Parameters
retThe result of the interpolation.
startThe start point of the interpolation.
finishThe finish point of the interpolation.
deltaThe interpolation coefficient. If delta is 0, then start is returned. If delta is 1, then finish is returned.