Ninja Library - Motion Function

njGetDrawMotion

Stores motion information

FORMAT

void njGetDrawMotion( *obj, *motion, *data, frame )
NJS_OBJECT *obj
NJS_MOTION *motion
NJS_MOTION_DATA *data
Float frame

PARAMETER

 *obj  Pointer to object structure 
 *motion  Pointer to motion structure 
 *data  Pointer to motion data structure 
 frame  Frame 

RETURN

None

DESCRIPTION

Stores motion information (shift, rotation, scaling) in the location specified by the parameter.

EXAMPLE

#include <Shinobi.h>
#define	OBJECT	object_sample
#define	MOTION	motion_sample
#define	NODE_NUM	20
#define	BUF_NUM	(NODE_NUM*3)
extern NJS_MOTION	MOTION[];
extern NJS_OBJECT	OBJECT[];
Float	ff = 0.f;
NJS_MOTION_DATA	data;
Float	pos[BUF_NUM];
Angle	ang[BUF_NUM];
Float	scl[BUF_NUM];
	:
data.pos = pos;
data.ang = ang;
data.scl = scl;
	:
Sint32 njUserMain(void)
{
	:
	njGetDrawMotion( OBJECT, MOTION, &data, ff );
	ff+=0.2f;
	if( ff >= (MOTION->nbFrame-1) ) ff=0.f;
	:
}
	:

REFERENCE

njGetAction()
njGetMotionTranslate()
njGetMotionRotate()
njGetMotionScale()

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