Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

23drawGL.h

00001 #include <stdio.h>
00002 #include <gl/gl.h>
00003 #include <gl/device.h>
00004 
00005 static float mat1[] = {
00006   AMBIENT, .5,.6,1.0,
00007   DIFFUSE, .5,.6,1.0,
00008   SPECULAR, .5,.6,1.0,
00009   LMNULL};
00010 static float mat2[] = {
00011   AMBIENT, 0.9,0.9,0.9,
00012   DIFFUSE, 1.0,1.0,1.0,
00013   SPECULAR, .2,.2,.2,
00014   LMNULL};
00015 static float matR[] = {
00016   AMBIENT, 0.7,0.2,0.1,
00017   DIFFUSE, 0.7,0.2,0.1,
00018   SPECULAR, 1.0,0.0,0.0,
00019   LMNULL};
00020 static float matG[] = {
00021   AMBIENT, 0.1,0.9,0.1, 
00022   DIFFUSE, 0.1,0.9,0.1,
00023   SPECULAR, 0.1,0.9,0.1,
00024   LMNULL};
00025 static float matB[] = {
00026   AMBIENT, 0.1,0.1,0.9, 
00027   DIFFUSE, 0.1,0.1,0.9,
00028   SPECULAR, 0.1,0.1,0.9,
00029   LMNULL};
00030 static float matF1[] = {
00031   AMBIENT, 0.,0.,1.0,
00032   DIFFUSE, 0.,0.,1.0,
00033   SPECULAR, 0.,0.,1.0,
00034   LMNULL};
00035 static float matF2[] = {
00036   AMBIENT, 0.1,0.1,0.9, 
00037   DIFFUSE, 0.1,0.1,0.9,
00038   SPECULAR, 0.1,0.1,0.9,
00039   LMNULL};
00040 static float matY[] = {
00041   AMBIENT, 0.1,0.7,0.7, 
00042   DIFFUSE, 0.1,0.7,0.7,
00043   SPECULAR, 0.1,0.7,0.7,
00044   LMNULL};
00045 static float lt1[] = {
00046   LCOLOR, 1.,1.,1.,
00047   POSITION, 0.,1.,1.,0.,
00048   LMNULL};
00049 static float lm1[] = {
00050   LOCALVIEWER, 0,
00051   LMNULL};
00052 
00053 typedef struct win_type {
00054    long id;
00055    long xorg,yorg;
00056    long xsiz,ysiz;
00057 } win_type; 
00058 
00059 static double origin[3] = {0.0,0.0,0.0};
00060 
00061 static Matrix scenerotmtx = {
00062    {1.0, 0.0,  0.0,  0.0},
00063    {0.0, 1.0,  0.0,  0.0},
00064    {0.0, 0.0,  1.0,  0.0},
00065    {0.0, 0.0,  0.0,  1.0}
00066 };
00067 static Matrix identitymtx = {
00068    {1.0, 0.0,  0.0,  0.0},
00069    {0.0, 1.0,  0.0,  0.0},
00070    {0.0, 0.0,  1.0,  0.0},
00071    {0.0, 0.0,  0.0,  1.0}
00072 };
00073 Device mousedev[2];
00074 short mouseval[2];
00075 static int mousex,mousey,oldmousex,oldmousey,viewdirty=1;
00076 //static float transmtx[3] = {-0.2,-0.7,-1.6};  VIDEO ZOOM OF KNEE
00077 //static float transmtx[3] = {-0.0,-0.8,-4.5};  VIDEO
00078 static float transmtx[3] = {-0.0,-1.0,-5.0};
00079 enum {NOTHING,TRANSLATE,ROTATE} orientmode;
00080 void reorient();
00081 void initializeBonePaths();
00082 void showmus(int muson[54],int musbod[54][5],int order[54][5],
00083             double y[],
00084             double ro[54][3],double ri[54][3],
00085             double roe[54][3],double ria[54][3],double rob[54][3],
00086             double viaang[54],int viadof[54],double cylR[54],double cyl[54][3]);
00087 void loadgfxrot(double location[3],double rotation[3][3],Matrix gfxrot);
00088 int drawmodel(double pcom[3],double floorcom[3],int bodynum[],double ang[],
00089         double cyl1[54][3],double cyl2[54][3],double cylR[54],
00090         double btj[10][3],double itj[10][3],double pin[10][3][3]);
00091 int drawsubject(int bodynum[],double ang[],
00092         double btj[10][3],double itj[10][3],double pin[10][3][3]);

Generated on Wed Aug 20 02:17:05 2003 for Simulation Software by doxygen1.3