##### Ninja Library - Motion Function

# njAction

Draws object with motion

### FORMAT

`

  void njAction( *action, frame )
  NJS_ACTION *action
  Float frame

`

### PARAMETER

  `*action` | Pointer to the action structure
  `Float` | Frame number

### RETURN

  None

### DESCRIPTION

  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 less than 10(9.9999) would be performed between the last frame and the first frame.

### EXAMPLE

      #define ACTION  action_sample
      extern NJS_ACTION ACTION[];
      	:
      njAction( ACTION,ff );
      ff+=0.2f;
      if( ff >= (ACTION->motion->nbFrame) ) ff-=ACTION->motion->nbFrame;
      	:

### NOTE

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

### REFERENCE

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

njAction

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999