njDrawMotion | Japanese
    <-|INDEX|->
Drawing Motion

### FORMAT

      #include <Ninja.h>
      void  njDrawMotion( *object, *motion, frame )
      NJS_OBJECT  *object
      NJS_MOTION  *motion
      Float       frame

### PARAMETERS

*object
  Pointer for the object structure
*motion
  Pointer for the motion structure
frame
  Frame number

### RETURN VALUE

  None

### ERROR VALUE

  None

### FUNCTION

- Draws motion following motion data.
- Floating point can be used for frame number, so it can supplemnet motion data.
- The range for frame number is 0 thru less than 10 (9.9999) when the frame number of a motion is 10.
- For example, suppose the frame number is 0.5. It will supplement the values between 0th frame and 1st frame and draw.
- Supplements for 9 thru 10(9.9999) would be performed between the last frame and the first frame.

### EXAMPLE

      #define  OBJECT    object_man
      #define  MOTION    motion_man
      extern NJS_OBJECT  OBJECT[];
      extern NJS_MOTION  MOTION[];

      void main() {
        Float  ff=0.0f;

        njInitSystem( NJD_RESOLUTION_640x480, 1 );
        njInitMatrix( matrix, 128 );
        njInit3D( vbuf, 1024, abuf, fbuf, 32 );
        njInitView( &view );
        njCreateLight( &light, NJD_DIR_LIGHT );
        njSetView( &view );

        while(1) {
          njClearMatrix();
          njDrawMotion( OBJECT, MOTION, ff );

          ff+=0.2f;
          if( ff >= (MOTION->nbFrame) ) ff-=MOTION->nbFrame;

          njWaitVSync();
        }
      }

### NOTES

- This is the same as njAction() except for that it is separated into object and motion.

### RELATED TOPICS

  njInit3D()
  njDrawModel()
  njDrawObject()
  njControl3D()
  njAction()

njDrawMotion |
    <-|INDEX|->