##### Ninja Library - Motion Function

# njDrawShapeMotion

Initializes shape buffer

### FORMAT

`

  void njInitShape( *buf )
  Float *buf

`

### PARAMETER

  `*buf` | Shape buffer

### RETURN

  None

### DESCRIPTION

  Sets a temporary buffer for shapes. Assuming "N" is the maximum number of vertices in the models that are used as shapes within all objects, the number of buffers needed is N x 3 for shapes that consist only of vertices or normal lines, and N x 6 for shapes that consist of both. For example, given the objects "Person 1" and "Person 2," in which only vertex shapes are used, then if the model for the "Face" of "Person 1" uses 1000 vertices, and this is the largest number of vertices within the object, then this function is specified as "buf[3000]".

### EXAMPLE

      #define OBJECT  object_sample /* Entered in NJA(NAM) file */
      #define MOTION  motion_sample /* Entered in NAM file */
      #define SHAPE  shape_sample /* Entered in NAS file */
      extern NJS_OBJECT OBJECT[];
      extern NJS_MOTION MOTION[];
      extern NJS_MOTION SHAPE[];
      float buf[6000];
      float ff=0.f;
      	:
      InitShape(buf);
      	:
      njDrawShapeMotion( OBJECT,MOTION,SHAPE,ff );
      ff+=0.2f;
      if( ff >= (MOTION->nbFrame-1) ) ff=0.f;
      	:

### NOTE

  This function must be set for the following functions that draw shapes (vertex animation) (in which the shape motion parameter is not NULL): `njDrawShapeMotion(),` `njFastDrawShapeMotion(),` `njDrawShapeMotionLink(),` and `njFastDrawShapeMotionLink().`

### REFERENCE

  `njFastDrawShapeMotion()
  njDrawShapeMotionLink()
  njFastDrawShapeMotionLink()
  `

njDrawShapeMotion

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999