/*---------------------------------------------------------------------------- * id1.c * * This file contains the code and data to initialize the hand vertices * information. *---------------------------------------------------------------------------- */ #include #include "defs.h" #include "ds.h" set_hand_data () { FACE_PTR f ; float *p ; /*-------------------------------------------------------------------------- * Initialize the hand vertex data. *-------------------------------------------------------------------------- */ /* set parameters for the hand */ arm.link[HAND].num_faces = 16 ; /* set parameters for the 1st face of the hand */ f = &arm.link[HAND].face[0] ; f->num_vertices = 4 ; f->color = COLOR1 ; /* set the vertex coordinates for the 1st face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = -5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = 5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = 5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; /* set parameters for the 2nd face (face[0]) of the hand */ (++f)->num_vertices = 4; f->color = COLOR2 ; /* set the vertex coordinates for the 2nd face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = -3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; /* set parameters for the 3rd face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR4 ; /* set the vertex coordinates for the 3rd face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = -4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; /* set parameters for the 4th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR4 ; /* set the vertex coordinates for the 4th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = -4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; /* set parameters for the 5th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR5; /* set the vertex coordinates for the 5th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = -4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = -4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = -3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; /* set parameters for the 6th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR5; /* set the vertex coordinates for the 6th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = 3.0 ; *p++ = 3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 3.0 ; *p++ = -3.0 ; *p++ = 0.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; /* set parameters for the 7th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR3; /* set the vertex coordinates for the 7th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = -15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = -15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = -4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; /* set parameters for the 8th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR3; /* set the vertex coordinates for the 8th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = 4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = 15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; /* set parameters for the 9th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR4 ; /* set the vertex coordinates for the 9th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = -12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; /* set parameters for the 10th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR4 ; /* set the vertex coordinates for the 10th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = 15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = 15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = 12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; /* set parameters for the 11th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR3 ; /* set the vertex coordinates for the 11th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; /* set parameters for the 12th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR3 ; /* set the vertex coordinates for the 12th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = 12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; /* set parameters for the 13th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR1 ; /* set the vertex coordinates for the 13th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = -5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; /* set parameters for the 14th face of the hand */ (++f)->num_vertices = 4 ; f->color = COLOR1 ; /* set the vertex coordinates for the 14th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = 5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; /* set parameters for the 15th face of the hand */ (++f)->num_vertices = 10 ; f->color = COLOR6 ; /* set the vertex coordinates for the 15th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = -15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = -12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = 5.0 ; *p++ = -5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 12.0 ; *p++ = -3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 15.0 ; *p++ = -6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = -4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; /* set parameters for the 16th face of the hand */ (++f)->num_vertices = 10 ; f->color = COLOR6 ; /* set the vertex coordinates for the 16th face of the hand */ p = &f->vertex[0][0] ; /* X coord Y coord Z coord W coord */ *p++ = -4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 4.0 ; *p++ = 4.0 ; *p++ = 14.0 ; *p++ = 1.0 ; *p++ = 15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; *p++ = 12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = 5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = -5.0 ; *p++ = 5.0 ; *p++ = 22.0 ; *p++ = 1.0 ; *p++ = -6.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -12.0 ; *p++ = 3.0 ; *p++ = 40.0 ; *p++ = 1.0 ; *p++ = -15.0 ; *p++ = 6.0 ; *p++ = 16.0 ; *p++ = 1.0 ; }