##### Ninja Library - Motion Function

# njFastActionLink

Links motion

### FORMAT

`

  void njFastActionLink( *actionlink, frame )
  NJS_ACTION_LINK *actionlink
  Float frame

`

### PARAMETER

  `*actionlink` | Pointer to action link structure
  `frame` | Frame number (from 0 to 1)

### RETURN

  None

### DESCRIPTION

  Links two motion structures. The motion link structure contains two motion frames, from the link source and link target. When the parameter frame is 0, the motion is of the source frame, and when it is 1, the motion is of the link target frame. Other frames (0 < ff < 1) are interpolated.

### EXAMPLE

      #include <Shinobi.h>
      #define	OBJECT	object_sample
      #define	MOTION1	motion_sample1 /* Entered in NAM file */
      #define	MOTION2	motion_sample2 /* Entered in NAM file */
      #define	STEPS	60
      extern NJS_MOTION	MOTION1[];
      extern NJS_MOTION	MOTION2[];
      NJS_MOTION_LINK	motionlink;
      NJS_ACTION_LINK	actionlink;
      	:
      actionlink.motionlink = &motionlink;
      actionlink.object = OBJECT;
      motionlink.motion[0] = MOTION1;/* Link source */
      motionlink.motion[1] = MOTION2;/* Link target */
      /* Interpolate from last frame of MOTION1 to 1.5 frames of MOTION2 */
      motionlink.frame[0] = MOTION1->nbFrame-1;
      motionlink.frame[1] = 1.5;
      	:
      njFastActionLink( &actionlink, ff/STEPS ); /* Frame specifies 0 - 1 */
      ff+=0.2f;
      if( ff >= STEPS - 1 ) ff=0.f;
      	:

### NOTE

  This drawing function is exactly the same as model drawing, except for the fact that motion has been added. In other words, all of the `njControl3D()` settings are identical. The function corresponds to the model function `njFastDrawObject().` The light source therefore is a bright light.

### REFERENCE

  `njActionLink()
  njDrawMotionLink()
  njSimpleActionLink()
  njSimpleDrawMotionLink()
  njFastDrawMotionLink()
  `

njFastActionLink

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999