vtlib library
|
Inherits Referenced.
Public Member Functions | |
bool | SetProjection (const vtProjection &proj, const LocalCS &conv) |
Must tell the AnimPath what projection its points are in, for serialization. | |
bool | GetMatrix (double time, FMatrix4 &matrix, bool bPosOnly) const |
Get the transformation matrix for a point in time. | |
virtual bool | GetInterpolatedControlPoint (double time, ControlPoint &controlPoint) const |
Get the local ControlPoint frame for a point in time. | |
void | Insert (double time, const ControlPoint &controlPoint) |
Insert a control point on this path. | |
void | RemovePoint (int index) |
Remove a control point from this path, by index. | |
uint | NumPoints () |
Return number of control points in this path. | |
void | SetInterpMode (InterpMode mode) |
InterpMode | GetInterpMode () const |
Returns the interpolation mode, either LINEAR or CUBIC_SPLINE. | |
void | SetLoop (bool bFlag) |
bool | GetLoop () const |
Return true if interpolation is set to loop back to the first point. | |
bool | Write (const char *fname) |
bool | Read (const char *fname) |
An animation path is a series of locations (class ControlPoint) which define a path through space in world coordinates. It is useful to use in conjunction with the vtAnimPathEngine class, which can move any transform (such as scene graph object or camera) along the path.
When this object is serialized to an XML file, the points are transformed to earth coordinates in GCS(WGS84) so that the result is interoperable and terrain-independent.
bool vtAnimPath::Read | ( | const char * | fname | ) |
Read the animation path from a .vtap file, a simple XML file format.
|
inline |
Set the interpolation mode, either vtAnimPath::LINEAR or vtAnimPath::CUBIC_SPLINE.
void vtAnimPath::SetLoop | ( | bool | bFlag | ) |
If Loop is true, interpolation of the control points will loop back to the first point. Where N is the number of points, normal interpolation is 0,1,2,...,N-1. Loop interpolation is 0,1,2,...,N-1,0. This is like the difference between an open polyline and a closed polygon.
bool vtAnimPath::Write | ( | const char * | fname | ) |
Write the animation path to a .vtap file, a simple XML file format.