Ninja Library - Motion Function

njSimpleAction

Executes motion

FORMAT

void njSimpleAction( *action, frame )
NJS_ACTION *action
Float frame

PARAMETER

 *action  Pointer to action structure 
 frame  Frame number 

RETURN

None

DESCRIPTION

Draws an object structure - action structure with motion (action structure).

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

#include <Shinobi.h>
#define	ACTION	action_sample /* Entered in NAM file */
extern NJS_ACTION	ACTION[];
	:
njSimpleAction( ACTION,ff );
ff+=0.2f;
if( ff >= (ACTION->motion->nbFrame-1) ) ff=0.f;
	:

NOTE

This drawing function is exactly the same as model drawing, except for the fact that motion has been added. The njControl3D settings therefore are all identical. Because the model functions correspond to njSimpleDrawObject() function, the light source is a single parallel light source.

REFERENCE

njSimpleDrawMotion()
njFastAction()
njFastDrawMotion()
njAction()
njDrawMotion()

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