/*----------------------------------------------------------------------------
 *     id.c
 *
 *    This file contains the code to initialize the upper and lower arm
 * vertex coordinates.
 *----------------------------------------------------------------------------
*/

#include    <exec/types.h>
#include    "defs.h"
#include    "ds.h"


init_arm_data ()
{
 float     *p ;
 FACE_PTR   f ;

 /*---------------------------------------------------------------------------
  *   Initialize the upper arm and lower arm vertices.
  *---------------------------------------------------------------------------
 */
 /* set parameters for the upper arm */
   arm.link[UPPER].num_faces  = 8 ;

   /* set parameters for the 1st face (face[0]) of the upper arm */
   f  = &arm.link[UPPER].face[0] ;
   f->num_vertices  = 6 ;
   f->color         = COLOR2 ;

     /* set the vertex coordinates for the 1st face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -3.0 ;    *p++ = -5.196 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =   3.0 ;    *p++ = -5.196 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =  6.0 ;    *p++ =   0.0  ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =   3.0 ;    *p++ =  5.196 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =  -3.0 ;    *p++ =  5.196 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  = -6.0 ;    *p++ =   0.0  ;    *p++ = 0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 2nd face of the upper arm */
   (++f)->num_vertices  = 6 ;
   f->color             = COLOR2 ;

     /* set the vertex coordinates for the 2nd face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  = -4.8 ;    *p++ =   0.0   ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =  -2.4 ;    *p++ =  4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ =  4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =  4.8 ;    *p++ =   0.0   ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;

   /* set parameters for the 3rd face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR4 ;

     /* set the vertex coordinates for the 3rd face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -3.0 ;    *p++ = -5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =  -2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =   3.0 ;    *p++ = -5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 4th face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR4 ;

     /* set the vertex coordinates for the 4th face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -3.0 ;    *p++ = 5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   3.0 ;    *p++ = 5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = 4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =  -2.4 ;    *p++ = 4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;


   /* set parameters for the 5th face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR5;

     /* set the vertex coordinates for the 5th face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   3.0 ;    *p++ = -5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =  4.8 ;    *p++ =   0.0   ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =  6.0 ;    *p++ =   0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 6th face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR5;

     /* set the vertex coordinates for the 6th face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   -6.0 ;    *p++ =   0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =    -3.0 ;    *p++ =  5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =    -2.4 ;    *p++ =  4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =   -4.8 ;    *p++ =   0.0   ;    *p++ = 70.0 ;    *p++ = 1.0 ;

   /* set parameters for the 7th face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR6;

     /* set the vertex coordinates for the 7th face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   -6.0 ;    *p++ =   0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   -4.8 ;    *p++ =   0.0   ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =    -2.4 ;    *p++ = -4.1568 ;    *p++ = 70.0 ;    *p++ = 1.0 ;
        *p++  =    -3.0 ;    *p++ = -5.196  ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 8th face of the upper arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR6;

     /* set the vertex coordinates for the 8th face of the upper arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  = 6.0 ;    *p++ =   0.0   ;    *p++ =   0.0 ;    *p++ = 1.0 ;
        *p++  = 4.8 ;    *p++ =   0.0   ;    *p++ =  70.0 ;    *p++ = 1.0 ;
        *p++  =  2.4 ;    *p++ =  4.1568 ;    *p++ =  70.0 ;    *p++ = 1.0 ;
        *p++  =  3.0 ;    *p++ =  5.196  ;    *p++ =   0.0 ;    *p++ = 1.0 ;

/*--------------------------------------------------------------------------*/

 /* set parameters for the lower arm */
   arm.link[LOWER].num_faces  = 8 ;

   /* set parameters for the 1st face (face[0]) of the lower arm */
   f  = &arm.link[LOWER].face[0] ;
   f->num_vertices  = 6 ;
   f->color         = COLOR2 ;

     /* set the vertex coordinates for the 1st face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -2.4 ;    *p++ = -4.1568 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = -4.1568 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =  4.8 ;    *p++ =    0.0  ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ =  4.1568 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  =  -2.4 ;    *p++ =  4.1568 ;    *p++ = 0.0 ;    *p++ = 1.0 ;
        *p++  = -4.8 ;    *p++ =    0.0  ;    *p++ = 0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 2nd face of the lower arm */
   (++f)->num_vertices  = 6 ;
   f->color             = COLOR2 ;

     /* set the vertex coordinates for the 2nd face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -1.6 ;    *p++ = -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =  -3.2 ;   *p++ =   0.0   ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =  -1.6 ;    *p++ =  2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   1.6 ;    *p++ =  2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   3.2 ;   *p++ =   0.0   ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   1.6 ;    *p++ = -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;

   /* set parameters for the 3rd face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR6 ;

     /* set the vertex coordinates for the 3rd face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -2.4 ;    *p++ = -4.1568  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =  -1.6 ;    *p++ =   -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   1.6 ;    *p++ =   -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = -4.1568  ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 4th face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR6 ;

     /* set the vertex coordinates for the 4th face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =  -2.4 ;    *p++ = 4.1568  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   2.4 ;    *p++ = 4.1568  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   1.6 ;    *p++ =   2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =  -1.6 ;    *p++ =   2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;


   /* set parameters for the 5th face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR1;

     /* set the vertex coordinates for the 5th face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   2.4 ;    *p++ = -4.1568  ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =   1.6 ;    *p++ =   -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =   3.2 ;    *p++ =    0.0   ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =  4.8 ;    *p++ =    0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 6th face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR1;

     /* set the vertex coordinates for the 6th face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   -4.8 ;    *p++ =   0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =    -2.4 ;    *p++ =  4.1568 ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =    -1.6 ;    *p++ =   2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =    -3.2 ;    *p++ =   0.0   ;    *p++ = 50.0 ;    *p++ = 1.0 ;

   /* set parameters for the 7th face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR4;

     /* set the vertex coordinates for the 7th face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  =   -4.8 ;    *p++ =   0.0   ;    *p++ =  0.0 ;    *p++ = 1.0 ;
        *p++  =    -3.2 ;    *p++ =   0.0   ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =    -1.6 ;    *p++ =  -2.7712 ;    *p++ = 50.0 ;    *p++ = 1.0 ;
        *p++  =    -2.4 ;    *p++ = -4.1568 ;    *p++ =  0.0 ;    *p++ = 1.0 ;

   /* set parameters for the 8th face of the lower arm */
   (++f)->num_vertices  = 4 ;
   f->color             = COLOR4;

     /* set the vertex coordinates for the 8th face of the lower arm */
     p  = &f->vertex[0][0] ;
        /*  X coord          Y coord          Z coord       W coord */ 
        *p++  = 4.8 ;    *p++ =   0.0   ;    *p++ =   0.0 ;    *p++ = 1.0 ;
        *p++  =  3.2 ;    *p++ =   0.0   ;    *p++ =  50.0 ;    *p++ = 1.0 ;
        *p++  =  1.6 ;    *p++ =   2.7712 ;    *p++ =  50.0 ;    *p++ = 1.0 ;
        *p++  =  2.4 ;    *p++ =  4.1568 ;    *p++ =   0.0 ;    *p++ = 1.0 ;

/*--------------------------------------------------------------------------*/


set_hand_data () ;   /* file is too big to compile in one pass */
}
