Ninja Library - Motion Function

njFastDrawMotion

Draws motion

FORMAT

void njFastDrawMotion( *object, *motion, frame )
NJS_OBJECT *object
NJS_MOTION *motion
Float frame

PARAMETER

 *object  Pointer to object structure 
 *motion  Pointer to motion structure 
 frame  Frame number 

RETURN

None

DESCRIPTION

Draws motion according to motion data. Because floating-point notation is possible for frame numbers, interpolation of motion data is possible. For motions where the number of frames is 10, the frame number range is 0 to less than 10 (9.9999). For example, when the frame number is set to 0.5, the values for the mean between frame 0 and frame 1 are interpolated and drawn. Interpolation for frames between 9 and less than 10 (9.9999) is carried out between the last frame and the first frame.

EXAMPLE

#define OBJECT object_sample
#define MOTION motion_sample
extern NJS_OBJECT OBJECT[];
extern NJS_MOTION MOTION[];
	:
njFastDrawMotion( ACTION,ff );
ff+=0.2f;
if( ff >= (ACTION->motion->nbFrame) ) ff-=ACTION->motion->nbFrame;
	:

NOTE

This is exactly the same as njAction() function, except for the fact that the action structure has been divided into object and motion.

REFERENCE

njInit3D()
njDrawModel()
njDrawObject()
njControl3D()
njAction()

njFastDrawMotion
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999