The Motion module provides support for creating and maintaining lists of named Paths and associated time-indexed events, and methods to sample the animation paths at any arbitrary time.
A Motion is a set of Paths and an associated list of time-indexed events. The most common use of Motions is to hold Actor animation. See documentation for gePath for more information on individual paths. See documentation for geActor for more information about Actor animations.
Motions are reference counted. See the Engine API Overview for a detailed discussion of reference counting.
A number of functions return pointers to the Paths or sub motions that are maintained by the Motion object. Clients should not destroy these objects, as they are owned by the Motion. If you want to own a Path that's maintained by a Motion, call gePath_CreateRef to increase the Path's reference count.
To create a Motion, call geMotion_Create. This will create an initially-empty Motion with with no Paths, Events, or sub motions. The Motion's type (simple or compound) is not set until the first Path or sub motion is added to the Motion. Once a motion's type is set, it cannot be changed.
To add a Path to the Motion, call geMotion_AddPath. There is no way to remove a path from the Motion.
To add a sub motion, call geMotion_AddSubMotion. To remove a sub motion, call geMotion_RemoveSubMotion. See the discussion of compound motions below for more information on sub motions.
To add an event, call geMotion_InsertEvent. To remove an event, call geMotion_DeleteEvent. See the discussion of Events below for more information.
Instead of individual paths, a motion may contain other motions. This type of motion is called a compound motion and the motions that it contains are called sub motions. Motions that contain other motions are also known as branch motions, and motions that contain path information are called leaf motions. Just like in a tree, a branch may have other branches subordinate to it, and it may also have leaves on it. But leaves are the end of the line.
A sub motion's time offset is its starting time, relative to the parent motion's starting time. So a sub motion that starts when the parent motion starts has a time offset of 0.0f.
Compound motions own their sub motions, and destroy them if the compound motion is destroyed. However, if you remove a sub motion from a compound motion, a pointer to the sub motion is returned and it is the caller's responsibility to destroy it.
geMotion_GetTransform does something with base transforms. But I'm not sure what base transforms do.
Currently, Motions can be saved in text or binary format. Text format is supported for historical reasons and will be removed in a later version. Binary format results in much faster input and output, and much smaller files. To output a binary file, call geMotion_WriteToBinaryFile. To output a text format file, call geMotion_WriteToFile. To read a Motion from a file, call geMotion_CreateFromFile.
There is currently no support for reading and writing compound motions.
geBoolean geMotion_AddPath(geMotion *Motion, gePath *Path, const char *Name, int *Index);
Description: Adds a reference to the passed Path to the specified Motion.
Parameters:
| Motion | The Motion to which the Path is to be added. |
| Path | The Path to be added. |
| Name | The Name to associate with this Path. The name may be NULL, in which case the path is not named. |
| Index | A pointer to an integer variable in which the path's index is returned. |
Returns: If the function succeeds, the return value is GE_TRUE. If any error occurs, the return value is GE_FALSE.
Remarks: Note that a reference to the Path is added to the Motion. If the caller wants the Motion to destroy the Path when the Motion is deleted, then the caller must call gePath_Destroy to reduce the Path's reference count after calling this function.
The function will return GE_FALSE if an attempt is made to add a Path to a compound motion.
Path names are case sensitive. Path names within a motion must be unique. The function will return GE_FALSE if the Motion already contains a Path with the specified Name.
geBoolean geMotion_AddSubMotion(geMotion *ParentMotion, geFloat TimeScale, geFloat TimeOffset, geMotion *SubMotion, geFloat StartTime, geFloat StartMagnitude, geFloat EndTime, geFloat EndMagnitude, const geXForm3D *Transform, int *Index);
Description: Adds a reference to the passed Motion to the specified Motion.
Parameters:
| ParentMotion | The Motion to which the sub motion is to be added. |
| TimeScale | Scale factor for this sub motion (0..1). |
| TimeOffset | Time in parent motion when sub motion should start. |
| SubMotion | The Motion to add as a sub motion. |
| StartTime | Submotion-relative blending start time. |
| StartMagnitude | Submotion blending start magnitude (0..1). |
| EndTime | Submotion-relative blending end time. |
| EndMagnitude | Submotion blending end magnitude (0..1). |
| Transform | Base transform to apply to this submotion. |
| Index | Returned motion index. |
Returns: If the function succeeds, the return value is GE_TRUE. If any error occurs, the return value is GE_FALSE.
Remarks: The function will return GE_FALSE if an attempt is made to add a sub motion to a Motion that already contains (or has contained) Paths.
The sub motion is always added to the end of the sub motions list. There is no support for inserting sub motions at arbitrary positions in the list.
geMotion * geMotion_Create(geBoolean ManageNames);
Description: Creates a new Motion.
Parameters:
| ManageNames | Determines whether the Motion maintains a list of names for the Paths that are added to it. Pass GE_TRUE to have the Motion manage the names. Pass GE_FALSE if you don't want the Motion to manage the names. |
Returns: If the function succeeds, the return value is an initially-empty Motion with no Paths, Events, or sub motions.
Remarks: The Motion's type (simple or compound) is not set until the first Path or sub motion is added to the Motion. The Motion is created without a name.
If you want a Motion to manage names, it must be created with the ManageNames parameter to set to GE_TRUE. There is no way to specify later that a Motion manage names.
geMotion * geMotion_CreateFromFile(geVFile *F);
Description: Read a Motion from the specified file.
Parameters:
| F | An opened file positioned at the point from which path information is to be read. The file may contain binary- or text-format information. |
Returns: If the function succeeds, the return value is a valid geMotion object. If the function fails, it returns NULL.
Remarks: When the function returns, the file will be positioned after the last byte read. The specified file may not be a directory.
geBoolean geMotion_DeleteEvent(geMotion *Motion, geFloat tKey);
Description: Removes an event from the Motion's event list.
Parameters:
| Motion | The Motion from which to delete the event. |
| Path | The time key of the event to delete. |
Returns: If the function finds and successfully deletes the event, the return value is GE_TRUE. If the event does not exist in the Motion, the function returns GE_FALSE.
Remarks: Events may not be added to or deleted from compound motions.
void geMotion_Destroy(geMotion **pMotion);
Description: Destroys the Motion pointed to by the specified Motion pointer.
Parameters:
| pMotion | A pointer to the motion to be destroyed. |
Returns: void
Remarks: The reference count of the specified Motion is decreased. If the reference count goes to zero, then the Motion information is deallocated and the referenced Motion pointer is set to NULL.
If the Motion is deallocated, all Paths and sub motions that it contains will also be destroyed. If their reference counts go to zero, they, too, will be deallocated.
const geXForm3d * geMotion_GetBaseTransform(const geMotion *Motion, int SubMotionIndex);
Description: Get a pointer to the base transform for a specified sub motion.
Parameters:
| Motion | The Motion that contains the sub motion to be queried. |
| SubMotionIndex | The index of the desired sub motion. |
Returns: If the passed Motion is a compound motion and the indexed sub motion exists, the return value is a const pointer to the sub motion's base transform. If any error occurs, the return value is NULL.
geFloat geMotion_GetBlendAmount(const geMotion *Motion, int SubMotionIndex, geFloat Time);
Description: Obtain the blend amount for a sub motion at a particular time.
Parameters:
| Motion | The Compound Motion to query. |
| SubMotionIndex | The index of the desired sub motion. |
| Time | The time, relative to the start of the compound motion, at which to obtain the blending amount. |
Returns: If the sub motion index is valid, the function returns the blend amount (from 0.0f to 1.0f, inclusive) for that sub motion at the given time. If the passed Motion is not a compound motion, or if the sub motion index is invalid, the return value is 0.0f.
gePath * geMotion_GetBlendPath(const geMotion *Motion, int SubMotionIndex);
Description: Obtain a pointer to a sub motion's blending path.
Parameters:
| Motion | The Compound Motion to query. |
| SubMotionIndex | The index of the desired sub motion. |
Returns: If the sub motion index is valid, the function returns a pointer to the Path that is used to blend the sub motion. If the Motion is not a compound motion, or if the desired sub motion does not exist, the return value is NULL.
Remarks: The caller is free to modify the blending path by accessing it through the gePath API functions, but should not call gePath_Destroy, as the Path is owned by the sub motion.
geBoolean geMotion_GetEventExtents(const geMotion *Motion, geFloat *FirstEventTime, geFloat *LastEventTime);
Description: Get the first and last events' starting times.
Parameters:
| Motion | The Motion to query. |
| FirstEventTime | A pointer to a floating-point variable that will receive the time of the Motion's first event. |
| LastEventTime | A pointer to a floating-point variable that will receive the time of the Motion's last event. |
Returns: The return value is GE_FALSE if the Motion has no events. Otherwise the return value is GE_TRUE.
Remarks: If the Motion has no events, the FirstEventTime and LastEventTime variables are not set. If Motion has only one event, the first and last event times will be equal.
const char * geMotion_GetName(const geMotion *Motion);
Description: Obtain a Motion's name.
Parameters:
| Motion | The Motion to query. |
Returns: The return value is a const pointer to the Motion's name, if set. If the Motion is not named, the return value is NULL.
int32 geMotion_GetNameChecksum(const geMotion *Motion);
Description: Return the check sum of the Motion's name pool.
Parameters:
| Motion | The Motion to query. |
Returns: If successful, the function returns the Motion's name pool checksum. On error, the function returns zero..
Remarks: This function is intended for internal use only.
const char * geMotion_GetNameOfPath(const geMotion *Motion, int Index);
Description: Obtain the name assigned to a given path.
Parameters:
| Motion | The Motion to query. |
| Index | The index of the desired path. |
Returns: If the indexed Path exists in the Motion, and has a name, the return value is a const pointer to the Path's name. If the Path doesn't exist or is not named, the return value is NULL.
geBoolean geMotion_GetNextEvent(geMotion *Motion, geFloat *pTime, const char **ppEventString);
Description: Get the event time and event string associated with the next event in the Motion.
Parameters:
| Motion | The Motion to query. |
| pTime | Pointer to a floating-point variable that will be filled with the next event's time. |
| ppEventString | Pointer to a character string pointer that will reference the next event's event string. This is a pointer to const string data. |
Returns: If successful, the function returns GE_TRUE and the variables pointed to by the pTime and ppEventString parameters are set. If an error occurs, the function returns GE_FALSE and the return variables are not modified. If the Motion has no more events, the function returns GE_FALSE, and the *pTime is set to 0.0f, and *ppEventString is set to NULL.
Remarks: A program must first call geMotion_SetEventIterator before calling this function. Iterates from StartTime to EndTime as set up in geMotion_SetEventIterator, and returns the Time and EventString for each event in the range beginning with StartTime up to but not including EndTime. After each call, the iterator is positioned for the next search.
gePath * geMotion_GetPath(const geMotion *Motion, int Index);
Description: Obtain a pointer to a desired Path..
Parameters:
| Motion | The Motion to query. |
| Index | The index of the desired path. |
Returns: If the indexed Path exists in the Motion, a pointer to the Path is returned. Otherwise the function returns NULL.
Remarks: If the Motion is a compound motion, the return value is NULL.
The caller is free to modify the returned Path by calling the gePath APIs, but must not call gePath_Destroy to destroy the Path returned by this function, without first calling gePath_CreateRef to increase the reference count.
int geMotion_GetPathCount(const geMotion *Motion);
Description: Get the number of paths owned by a Motion.
Parameters:
| Motion | The Motion to query. |
Returns: The number of Paths owned by the Motion.
Remarks: If the Motion is a compound motion, the return value is 0.
gePath * geMotion_GetPathNamed(const geMotion *Motion, const char *Name);
Description: Obtain a pointer to a named Path..
Parameters:
| Motion | The Motion to query. |
| Name | The name of the desired path. |
Returns: If the named Path exists in the Motion, a pointer to the Path is returned. Otherwise the function returns NULL.
Remarks: If the Motion is a compound motion, or if the Motion does not maintain a list of Path names, the return value is NULL.
Path names are case-sensitive.
The caller is free to modify the returned Path by calling the gePath APIs, but must not call gePath_Destroy to destroy the Path returned by this function, without first calling gePath_CreateRef to increase the reference count.
geMotion * geMotion_GetSubMotion(const geMotion *Motion, int Index);
Description: Obtain a pointer to a sub motion.
Parameters:
| Motion | The Motion to query. |
| Index | The index of the desired sub motion. |
Returns: If the indexed submotion exists, a pointer to it is returned. Otherwise the function returns NULL.
Remarks: If the Motion is not a compound motion, the return value is NULL.
The caller is free to modify the returned Motion by calling the geMotion APIs, but must not call geMotion_Destroy to destroy the Motion returned by this function.
int geMotion_GetSubMotionCount(const geMotion *Motion);
Description: Get the number of sub motions contained in a compound motion.
Parameters:
| Motion | The compound Motion to query. |
Returns: The number of sub motions contained in the Motion.
Remarks: If the Motion is not a compound motion, the return value is 0.
geMotion * geMotion_GetSubMotionNamed(const geMotion *Motion,const char *Name);
Description: Obtain a pointer to a named sub motion..
Parameters:
| Motion | The Motion to query. |
| Name | The name of the desired sub motion. |
Returns: If the named sub motion exists, a pointer to the sub motion is returned. Otherwise the function returns NULL.
Remarks: If the Motion is not a compound motion, the return value is NULL.
Sub motion names are case-sensitive.
The caller is free to modify the returned Motion by calling the geMotion APIs, but must not call geMotion_Destroy to destroy the Motion returned by this function.
geBoolean geMotion_GetTimeExtents(const geMotion *Motion, geFloat *StartTime,geFloat *EndTime);
Description: Gets the motion's starting and ending times.
Parameters:
| Motion | The Motion to query. |
| StartTime | Pointer to a floating point variable that will be filled with the time of the Motion's earliest key frame. |
| EndTime | Pointer to a floating point variable that will be filled with the time of the Motion's latest key frame. |
Returns: If successful, the function returns GE_TRUE and the variables pointed to by the StartTime and EndTime parameters are filled with the Motion's earliest and latest key times, respectively. If any error occurs, the function returns GE_FALSE and the times are not set.
Remarks: If the Motion is a compound motion, StartTime and EndTime values are computed from the scaled sub motions.
No scaling is applied to simple (i.e. non-compound) Motions.
If the Motion has no events (i.e. no key frames in any path), the function returns GE_FALSE.
geFloat geMotion_GetTimeOffset(const geMotion
*Motion, int SubMotionIndex );
Description: Get a sub motion's time offset.
Parameters:
| Motion | The compound motion to query. |
| SubMotionIndex | The index of the desired sub motion. |
Returns: If the sub motion exists, its time offset is returned. The function returns 0.0f on error.
Remarks: If the Motion is not a compound motion, the return value is 0.0f.
A sub motion's time offset is its starting time, relative to the parent motion's starting time. So a sub motion that starts when the parent motion starts has a time offset of 0.0f.
geFloat geMotion_GetTimeScale (const geMotion *Motion, int SubMotionIndex);
Description: Get a sub motion's time scale.
Parameters:
| Motion | The compound motion to query. |
| SubMotionIndex | The index of the desired sub motion. |
Returns: If the sub motion exists, its time scale is returned. The function returns 0.0f on error.
Remarks: If the Motion is not a compound motion, the return value is 0.0f.
A sub motion's time scale is the scaling value that's applied to sub motion sample times after the TimeOffset is applied. The formula used to determine the time into a sub motion is:
| SubMotionTime = (CurrentTime - TimeOffset) * TimeScale |
Negative time scales cause the sub motion to run backwards.
geBoolean geMotion_GetTransform(const geMotion *Motion, geFloat Time, geXForm3d *Transform);
Description: Obtain a compound motion's blended base transform.
Parameters:
| Motion | The compound Motion to query. |
| Time | The time at which to query the compound motion. |
| Transform | Pointer to a transform that is filled in with the blended base transform. |
Returns: If successful, the function returns GE_TRUE the Transform pointed to is filled with the blended base transform. On error, or if the motion is not a compound motion, the function returns GE_FALSE and the Transform is not modified.
Remarks: Each sub motion has an optional base transform. This function provides a way to blend the base transforms of the sub motions in a compound motion.
geBoolean geMotion_HasNames(const geMotion *Motion);
Description: Determine if a Motion maintains a list of Path names.
Parameters:
| Motion | The motion to query. |
Returns: If the Motion maintains Path names, the return value is GE_TRUE. Otherwise the return valus is FALSE.
Remarks: A Motion must be created with the ManageNames parameter to geMotion_Create set to GE_TRUE in order for names to be managed. There is no way to specify later that a Motion manage names. If geMotion_RemoveNames is called, the Motion will no longer manage names.
geBoolean geMotion_InsertEvent(geMotion *Motion, geFloat tKey, const char* String);
Description: Insert an event into the Motion's event list.
Parameters:
| Motion | The Motion in which to insert the event. |
| Time | The event's time time key. |
| String | The event string to be associated with this time key. |
Returns: If the event is successfully added, the function returns GE_TRUE. If any error occurs, the return value is GE_FALSE.
Remarks: Only one event is allowed at a given time. If you attempt to add an event at an existing time, the function returns GE_FALSE.
The function returns GE_FALSE if you attempt to add an event to a compound Motion.
geBoolean geMotion_IsValid(const geMotion *Motion);
Description: Determine if a Motion is valid.
Parameters:
| Motion | The Motion to validate. |
Returns: If specified Motion is valid, the return value is GE_TRUE. If any of the Motion's internal fields is invalid, the function returns GE_FALSE.
Remarks: This is a debugging function that is intended for internal use only.
geBoolean geMotion_RemoveNames(geMotion *Motion);
Description: Delete a Motion's path names table and stop maintaining Path names information.
Parameters:
| Motion | The Motion for which to cancel Path names maintenance. |
Returns: If successful, the function returns GE_TRUE. If the Motion is a compound motion, or if the Motion has been cloned, the function returns GE_FALSE.
Remarks: There is no way to re-enable Path names maintenance for a Motion after calling this function.
geMotion * geMotion_RemoveSubMotion(geMotion *ParentMotion, int SubMotionIndex);
Description: Remove a sub motion from a compound motion.
Parameters:
| ParentMotion | The Motion from which to remove the sub motion. |
| SubMotionIndex | Index of the sub motion to be removed. |
Returns: If successful, the function returns a pointer to the sub motion that was removed. The function will return NULL if the ParentMotion is not a compound motion.
void geMotion_Sample(const geMotion *Motion, int PathIndex, geFloat Time, geXForm3d *Transform);
Description: Sample a specified path at a given time.
Parameters:
| Motion | The Motion that contains the Path to sample. |
| PathIndex | The index of the Path to sample. |
| Time | The time at which the Path should be sampled. |
| Transform | The matrix in which to return the transform for the current time. |
Returns: void
Remarks: For a simple (non-compound) Motion, this function samples the path in the same way as does gePath_Sample. See the description of gePath_Sample for more information.
For a compound Motion, the indexed path for each leaf motion in the hierarchy is sampled and the results are blended using the leaf motions' blending and scaling values.
The function will fail if the path index does not exist in the motion. For a compound motion, the path index must exist in every leaf motion in the hierarchy.
void geMotion_SampleChannels(const geMotion *Motion, int PathIndex, geFloat Time, geQuaternion *Rotation, geVec3d *Translation);
Description: Sample the specified path at the given time to obtain the individual transform components.
Parameters:
| Motion | The Motion that contains the Path to sample. |
| PathIndex | The index of the path to sample. |
| Time | The time at which to sample the path. |
| Rotation | The quaternion in which to return the rotation component. |
| Translation | The vector in which to return the translation component. |
Returns: void
Remarks: For a simple (non-compound) Motion, this function samples the path in the same way as gePath_SampleChannels. See the description of gePath_SampleChannels for more information.
For a compound Motion, the indexed path for each leaf motion in the hierarchy is sampled and the results are blended using the leaf motions' blending and scaling values.
The function will fail if the path index does not exist in the motion. For a compound motion, the path index must exist in every leaf motion in the hierarchy.
geBoolean geMotion_SampleChannelsNamed(const geMotion *Motion, const char *PathName, geFloat Time, geQuaternion *Rotation, geVec3d *Translation);
Description: Sample the specified named path at the given time to obtain the individual transform components.
Parameters:
| Motion | The Motion that contains the Path to sample. |
| PathName | The name of the path to sample. |
| Time | The time at which to sample the path. |
| Rotation | The quaternion in which to return the rotation component. |
| Translation | The vector in which to return the translation component. |
Returns: If the function is successful, it returns GE_TRUE and the Rotation and Translation values are set. The function will return GE_FALSE if the named path does not exist in the motion.
Remarks: For a simple (non-compound) Motion, this function samples the path in the same way as gePath_SampleChannels. See the description of gePath_SampleChannels for more information.
For a compound Motion, the named path for each leaf motion in the hierarchy is sampled and the results are blended using the leaf motions' blending and scaling values. If a particular leaf motion does not contain a path with the specified name, that leaf motion is ignored. The function will return GE_FALSE if none of the leaf motions contain a path with the specified name.
geBoolean geMotion_SampleNamed(const geMotion *Motion, const char *PathName, geFloat Time, geXForm3d *Transform);
Description: Sample the specified named path at the given time.
Parameters:
| Motion | The Motion that contains the Path to sample. |
| PathName | The name of the path to sample. |
| Time | The time at which to sample the path. |
| Transform | The matrix in which to return the transform for the current time. |
Returns: void
Remarks: For a simple (non-compound) Motion, this function samples the path in the same way as gePath_Sample. See the description of gePath_Sample for more information.
For a compound Motion, the named path for each leaf motion in the hierarchy is sampled and the results are blended using the leaf motions' blending and scaling values.
For a compound Motion, the named path for each leaf motion in the hierarchy is sampled and the results are blended using the leaf motions' blending and scaling values. If a particular leaf motion does not contain a path with the specified name, that leaf motion is ignored. The function will return GE_FALSE if none of the leaf motions contain a path with the specified name.geBoolean geMotion_SetName(geMotion *M, const char * Name);
geBoolean geMotion_SetBaseTransform(geMotion *Motion, int SubMotionIndex, geXForm3d *BaseTransform);
Description: Set a sub motion's base transform.
Parameters:
| Motion | The compound Motion that contains the sub motion. |
| SubMotionIndex | Index of the sub motion whose time offset is to be set. |
| BaseTransform | The sub motion's new base transform. Pass NULL to clear any existing base transform. |
Returns: If the Motion is a compound motion and the sub motion exists, the return value is GE_TRUE. The function will return GE_FALSE if the Motion is not a compound motion.
Remarks: The function will fail if the indexed sub motion does not exist.
geBoolean geMotion_SetBlendPath(geMotion *Motion, int SubMotionIndex, gePath *Blend);
Description: Set a sub motion's blending path.
Parameters:
| Motion | The compound Motion that contains the sub motion. |
| SubMotionIndex | Index of the sub motion whose time offset is to be set. |
| Blend | The sub motion's new blend path. |
Returns: If the Motion is a compound motion and the sub motion exists, the return value is GE_TRUE. The function will return GE_FALSE if the Motion is not a compound motion.
Remarks: The function will fail if the indexed sub motion does not exist.
The function creates a copy of (not a reference to) the blend path for its own use. The caller is responsible for destroying the path that it passes in the Blend parameter.
Any existing blend path for the sub motion will be destroyed.
geBoolean geMotion_SetTimeOffset(geMotion *Motion, int SubMotionIndex, geFloat TimeOffset);
Description: Set the time offset for a sub motion.
Parameters:
| Motion | The compound Motion that contains the sub motion. |
| SubMotionIndex | Index of the sub motion whose time offset is to be set. |
| TimeOffset | The sub motion's new time offset. |
Returns: If the Motion is a compound motion and the sub motion exists, the return value is GE_TRUE. The function will return GE_FALSE if the Motion is not a compound motion.
Remarks: The function will fail if the indexed sub motion does not exist.
geBoolean geMotion_SetTimeScale(geMotion *Motion,int SubMotionIndex,geFloat TimeScale);
Description: Set a sub motion's time scale.
Parameters:
| Motion | The compound Motion that contains the sub motion. |
| SubMotionIndex | Index of the sub motion whose time offset is to be set. |
| TimeScale | The sub motion's new time scale. |
Returns: If the Motion is a compound motion and the sub motion exists, the return value is GE_TRUE. The function will return GE_FALSE if the Motion is not a compound motion.
Remarks: The function will fail if the indexed sub motion does not exist.
void geMotion_SetupEventIterator(geMotion *Motion, geFloat StartTime, geFloat EndTime);
Description: Initialize the structures necessary to iterate over a motion's events.
Parameters:
| Motion | The Motion whose events are to be enumerated. |
| StartTime | First time for which events are to be returned. |
| EndTime | Ending iterator time. |
Returns: void
Remarks: This function resets internal variables in the Motion so that its events can be enumerated by successive calls to geMotion_GetNextEvent. The first to geMotion_GetNextEvent will return the first event whose time is equal to or greater than StartTime. Subsequent calls to geMotion_GetNextEvent will return events up to but not including EndTime.
geBoolean geMotion_WriteToBinaryFile(const geMotion *M,geVFile *pFile);
Description: Write the Motion information, in binary format, to a file.
Parameters:
| Motion | The Motion to output. |
| F | A pointer to an open VFile object to which the Motion will be saved. |
Returns: GE_TRUE if the output operation is successful. If any error occurs, GE_FALSE is returned.
Remarks: The file must be opened before calling this function. This is the recommended method of writing a Motion to a file.
geBoolean geMotion_WriteToFile(const geMotion *M, geVFile *f);
Description: Write the Motion, in text format, to a file.
Parameters:
| Motion | The Motion to output. |
| F | A pointer to an open VFile object to which the Motion will be saved. |
Returns: GE_TRUE if the output operation is successful. If any error occurs, GE_FALSE is returned.
Remarks: The file must be opened before calling this function.
This function is obsolete and should be used for backward compatibility only. Text format will be removed in a future version. Text format requires more space to store and more time to save and load than does binary format. New programs should use geMotion_WriteToBinaryFile.