Ninja Library - Motion Function

njCnkEasyMultiDrawMotion

Draws motion

FORMAT

void njCnkEasyMultiDrawMotion( *object, *motion, frame )
NJS_CNK_OBJECT *object
NJS_MOTION *motion
Float frame

PARAMETER

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

RETURN

None

DESCRIPTION

Draws a 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

#include <Shinobi.h>
#define OBJECT  object_sample
#define MOTION  motion_sample
extern NJS_CNK_OBJECT OBJECT[];
extern NJS_MOTION MOTION[];
	:
njInitView( &view );
njSetView( &view );
njCnkSetEasyMultiLight( 1 );
njCnkSetEasyMultiLightVector(0.f, 0.f, -1.f);
njCnkSetEasyMultiAmbient(0.1f, 0.1f, 0.1f);
njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_1, 0.6f, 0.5f, 0.3f);
njCnkSetEasyMultiLightMatrices();
	:
njCnkEasyMultiDrawMotion( MOTION,ff );
ff+=0.2f;
if( ff >= (MOTION->nbFrame) ) ff-=MOTION->nbFrame;
	:

NOTE

This is a motion for chunk object structures.

REFERENCE

njCnkEasyMultiDrawObject()

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