njAction | Japanese
    --|INDEX|->
Drawing motion

### FORMAT

      #include <Ninja.h>
      void   njAction( *action, frame )
      NJS_ACTION  *action
      Float       frame

### PARAMETERS

NJS_ACTION *action
  action Pointer to the action structure
Float frame
  Frame number

### RETURN VALUE

  None

### ERROR VALUE

  None

### FUNCTION

- Draws object structure with motion - action structure.
- Floating point can be used for frame number, so it can supplement 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  ACTION    action_man
      extern NJS_ACTION  ACTION[];

      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();
          njAction( ACTION,ff );

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

          njWaitVSync();
        }
      }

### NOTES

- As for drawing, it is completely the same as model drawing, except that it has motion.
- Therefore, settings for njControl3D are the same.

### RELATED TOPICS

  njInit3D()
  njDrawModel()
  njDrawObject()
  njControl3D()
  njDrawMotion()

njAction |
    --|INDEX|->