Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpMorph
[Morphing]


Data Structures

struct   RpMorphInterpolator

Typedefs

typedef RwReal(*  RpMorphGeometryCallBack )(RpAtomic *atomic, RwReal position)

Functions

RpGeometry RpMorphGeometryCreateInterpolators (RpGeometry *geometry, RwInt32 numInterps)
RpGeometry RpMorphGeometrySetInterpolator (RpGeometry *geometry, RwInt32 interpNum, RwInt32 startKey, RwInt32 endKey, RwReal time)
RpGeometry RpMorphGeometrySetNextInterpolator (RpGeometry *geometry, RwInt32 interpNum, RwInt32 interpNumNext)
RpGeometry RpMorphGeometrySetCallBack (RpGeometry *geometry, RpMorphGeometryCallBack animCB)
RpMorphGeometryCallBack  RpMorphGeometryGetCallBack (const RpGeometry *geometry)
RpAtomic RpMorphAtomicSetCurrentInterpolator (RpAtomic *atomic, RwInt32 interpNum)
RwInt32  RpMorphAtomicGetCurrentInterpolator (RpAtomic *atomic)
RpMorphInterpolator RpMorphGeometryGetInterpolator (RpGeometry *geometry, RwInt32 interpNum)
RpAtomic RpMorphAtomicSetTime (RpAtomic *atomic, RwReal time)
RpAtomic RpMorphAtomicAddTime (RpAtomic *atomic, RwReal time)
RwBool  RpMorphPluginAttach (void)

Detailed Description

Morphing Plugin for RenderWare Graphics.

RpMorph Plugin Overview

Requirements

Overview

The RpMorph plugin extends the core RenderWare Graphics API by adding morph animation facilities to the developer’s arsenal.

Morph animation is used to generate the intermediate frames needed to seamlessly morph a geometry to match another. (Eg: changing a facial expression from a frown to a smile.)

In use, the developer specifies a starting and ending RpGeometry objects for an RpAtomic. These two objects are the morph targets. The RpMorph functions are then used to generate interpolated new RpGeometry data from the two morph targets over time.


Typedef Documentation

typedef RwReal(* RpMorphGeometryCallBack)(RpAtomic *atomic, RwReal position)
 

This is the callback function supplied to RpMorphGeometrySetCallBack and returned from RpMorphGeometryGetCallBack. The supplied function will be passed a pointer to the geometry's parent atomic, and the position of the current interpolator. The function will only be called when the position of the geometry's current interpolator moves out of the current range.

Parameters:
atomic  Pointer to the geometry's parent atomic.
position  Value of the current interpolator.
Returns:
See also:
RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack

Function Documentation

RpAtomic* RpMorphAtomicAddTime RpAtomic   atomic,
RwReal    time
 

RpMorphAtomicAddTime is used to advance the morph target animation of the specified atomic by the given amount. The time is measured in seconds and would normally represent the time elapsed between two successive rendering frames.

The morph plugin must be attached before using this function.

Parameters:
atomic  Pointer to the atomic containing morph target animation extension data.
time  A RwReal value equal to the time increment.
Returns:
a pointer to the atomic if successful or NULL if there is an error.
See also:
RpMorphAtomicSetTime , RpMorphAtomicSetCurrentInterpolator , RpMorphAtomicGetCurrentInterpolator , RpMorphGeometryGetInterpolator , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphPluginAttach
RwInt32 RpMorphAtomicGetCurrentInterpolator RpAtomic   atomic
 

RpMorphAtomicGetCurrentInterpolator is used to retrieve the index of the specified atomic's current interpolator.

The morph plugin must be attached before using this function.

Parameters:
atomic  Pointer to the atomic containing morph target animation extension data.
Returns:
a RwInt32 value equal to the index of the current interpolator if successful or - 1 if there is an error.
See also:
RpMorphAtomicSetCurrentInterpolator , RpMorphGeometryGetInterpolator , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphPluginAttach
RpAtomic* RpMorphAtomicSetCurrentInterpolator RpAtomic   atomic,
RwInt32    interpNum
 

RpMorphAtomicSetCurrentInterpolator is used to set the specified atomic's current interpolator.

The morph plugin must be attached before using this function.

Parameters:
atomic  Pointer to the atomic for which the morph target animation extension data is to be set.
interpNum  a RwInt32 value equal to the index of an interpolator which is to become the current interpolator.
Returns:
a pointer to the atomic if successful or NULL if there is an error.
See also:
RpMorphAtomicSetCurrentInterpolator , RpMorphGeometryGetInterpolator , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphPluginAttach
RpAtomic* RpMorphAtomicSetTime RpAtomic   atomic,
RwReal    time
 

RpMorphAtomicSetTime is used to define the position of the specified atomic's current interpolator.

The morph plugin must be attached before using this function.

Parameters:
atomic  Pointer to the atomic containing morph target animation extension data.
time  A RwReal value equal to the time.
Returns:
a pointer to the atomic if successful or NULL if there is an error.
See also:
RpMorphAtomicAddTime , RpMorphAtomicSetCurrentInterpolator , RpMorphAtomicGetCurrentInterpolator , RpMorphGeometryGetInterpolator , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphPluginAttach
RpGeometry* RpMorphGeometryCreateInterpolators RpGeometry   geometry,
RwInt32    numInterps
 

RpMorphGeometryCreateInterpolators is used to create the given number of interpolators in the animation extension data of the specified geometry.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry.
numInterps  A RwInt32 value equal to the number of interpolators.
Returns:
a pointer to the geometry if successful or NULL if there is an error.
See also:
RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphPluginAttach
RpMorphGeometryCallBack RpMorphGeometryGetCallBack const RpGeometry   geometry
 

RpMorphGeometryGetCallBack is used to retrieve the callback function associated with the specified geometry.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry.
Returns:
pointer to the callback function if successful or NULL if there is an error.
See also:
RpMorphGeometrySetCallBack , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphPluginAttach
RpMorphInterpolator* RpMorphGeometryGetInterpolator RpGeometry   geometry,
RwInt32    interpNum
 

RpMorphGeometryGetInterpolator is used to retrieve a pointer to the specified geometry's interpolator which has the given index.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry containing morph target animation extension data.
interpNum  A RwInt32 value equal to the index of the interpolator.
Returns:
a pointer to the interpolator if successful or NULL if there is an error.
See also:
RpMorphAtomicSetCurrentInterpolator , RpMorphAtomicGetCurrentInterpolator , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphPluginAttach
RpGeometry* RpMorphGeometrySetCallBack RpGeometry   geometry,
RpMorphGeometryCallBack    animCB
 

RpMorphGeometrySetCallBack is used to define the callback function associated with the specified geometry.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry.
animCB  Pointer to the callback function.
Returns:
pointer to the geometry if successful or NULL if there is an error.
See also:
RpMorphGeometryGetCallBack , RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetNextInterpolator , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphPluginAttach
RpGeometry* RpMorphGeometrySetInterpolator RpGeometry   geometry,
RwInt32    interpNum,
RwInt32    startKey,
RwInt32    endKey,
RwReal    time
 

RpMorphGeometrySetInterpolator is used to initialize the interpolator in the specified geometry with the given index using the specified start morph target index, end morph target index and time duration (in seconds) that the interpolator will run for. The interpolator is specified with an index into the interpolator array in the geometry's animation extension data. The start and end morph targets are specified with indices into the geometry's morph target array.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry.
interpNum  A RwInt32 value equal to the index of the interpolator.
startKey  A RwInt32 value equal to the index of the start morph target.
endKey  A RwInt32 value equal to the index of the end morph target.
time  A RwReal value equal to the interpolator duration.
Returns:
a pointer to the geometry if successful or NULL if there is an error.
See also:
RpMorphGeometryCreateInterpolators , RpMorphGeometrySetNextInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphPluginAttach
RpGeometry* RpMorphGeometrySetNextInterpolator RpGeometry   geometry,
RwInt32    interpNum,
RwInt32    interpNumNext
 

RpMorphGeometrySetNextInterpolator is used to set the interpolator that will be executed after the current interpolator has expired.

The morph plugin must be attached before using this function.

Parameters:
geometry  Pointer to the geometry.
interpNum  A RwInt32 value equal to the index of the current interpolator.
interpNumNext  A RwInt32 value equal to the index of the next interpolator.
Returns:
a pointer to the geometry if successful or NULL if there is an error.
See also:
RpMorphGeometryCreateInterpolators , RpMorphGeometrySetInterpolator , RpMorphGeometrySetCallBack , RpMorphGeometryGetCallBack , RpMorphAtomicAddTime , RpMorphAtomicSetTime , RpMorphPluginAttach
RwBool RpMorphPluginAttach void   
 

RpMorphPluginAttach is used to attach the morph plugin to the RenderWare system to enable the generation of morph target animations. The plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen.

Note:
The morph plugin requires the world plug-in to be attached. The include file rpmorph.h is also required and must be included by an application wishing to generate morph target animations.
Returns:
TRUE if successful or FALSE if there is an error
See also:
RwEngineInit , RwEngineOpen , RwEngineStart , RpWorldPluginAttach

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:26 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)