njDrawShapeMotionLink | Japanese
    <-|INDEX|->
Links motions that include shapes.

### FORMAT

      #include <Ninja.h>
      void  njDrawShapeMotionLink( object, motionlink, shapelink, frame )
      NJS_OBJECT       *object
      NJS_MOTION_LINK  *motionlink
      NJS_MOTION_LINK  *shapelink
      Float            frame

### PARAMETERS

object
  Pointer to object structure
motionlink
  Pointer to motion link structure
shapelink
  Pointer to motion link structure (vertex animation)
frame
  Frame number (from 0 to 1)

### RETURN VALUE

  None

### ERROR VALUE

  None

### FUNCTION

- This function links two motion structures.
- The frames in the motion link structure are the link source and link destination motion frames.
- When the frame parameter is "0", the frame is part of the motion of the link source frame; when the frame parameter is "1", the frame is part of the motion of the link destination frame.
- Other values (0 < ff < 1) interpolate the motion between the link destination frame and the link source frame.
- This also applies to shapes (vertex animation).

### EXAMPLE

      #include <NINJA.H>

      #define  OBJECT    object_sample
      #define  MOTION1    motion_sample1 /* described within NAM file */
      #define  MOTION2    motion_sample2 /* described within NAM file */
      #define  SHAPE1    shape_sample1  /* described within NAS file */
      #define  SHAPE2    shape_sample2 /* described within NAS file */
      #define  STEPS    60

      extern NJS_MOTION  MOTION1[];
      extern NJS_MOTION  MOTION2[];
      extern NJS_MOTION  SHAPE1[];
      extern NJS_MOTION  SHAPE2[];

      NJS_MOTION_LINK  motionlink;
      NJS_MOTION_LINK  shapelink;

      ...........
      motionlink.motion[0] = MOTION1;/* link source */
      motionlink.motion[1] = MOTION2;/* link destination */
      shapelink.motion[0] = SHAPE1;/* link source */
      shapelink.motion[1] = SHAPE2;/* link destination */
      /* interpolate 1.5 frames of MOTION2 from the final frame of MOTION1 */
      motionlink.frame[0] =
      shapelink.frame[0] = MOTION1->nbFrame-1;
      motionlink.frame[1] =
      shapelink.frame[1] = 1.5;

      ...........
      njDrawShapeMotionLink( OBJECT, &motionlink, &shapelink, ff/STEPS );
      /* Specify from 0 - 1 for frames */

      ff+=0.2f;
      if( ff >= STEPS - 1 ) ff=0.f;
      ...........

### NOTES

  The drawing performed by this function is identical to model drawing, except that motion and shapes (vertex animation) have been added. In other words, all of the njControl3D settings are identical. This function corresponds to the model drawing function njDrawObject, so the light source is normal light.

### RELATED TOPICS

  Related Items
  njInitShape()
  njFastDrawShapeMotionLink()

njDrawShapeMotionLink |
    <-|INDEX|->