00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00029 #ifndef CREATE_VRML_H
00030 #define CREATE_VRML_H
00031
00032 #ifdef WINDOWS
00033 #define extern __declspec (dllexport)
00034 #endif
00035
00036
00037 #include <stdio.h>
00038 #include <stdlib.h>
00039
00040 #define TRUE 1
00041 #define FALSE 0
00042
00043
00047 struct VRMLFeatures {
00048 int useJava;
00051 int nbSamples;
00052 double dt;
00053 int nbJoints;
00054 double *jointsRot;
00057 double *jointsPos;
00060 char **jointsNames;
00061 char *geomFilename;
00063 char *outputFilename;
00065 int nbPhysVec;
00067 char **physVecNames;
00069 double *physVecRGB;
00072 double *physVecRot;
00075 double *physVecPos;
00078 double *physVecScale;
00082 };
00083
00084 struct MatList {
00085 char name[64];
00086 struct MatList *next;
00087
00088 };
00089
00090
00091
00092
00093 enum InterpType {
00094 POSITION,
00095 ORIENTATION,
00096 COLOR,
00097 SCALE
00098 };
00099
00100 void InitVRMLFeatures();
00101
00102 void ResetVRMLFeatures();
00103
00104 int SetUpVRMLFile(char *outputFilename, int useJava);
00105
00106 int SetUpVRMLInterpolation( int nbS,
00107 double dt);
00108
00109 int SetUpVRMLCharacter( char *geomFilename,
00110 int nb,
00111 char **names,
00112 double *rot,
00113 double *pos);
00114
00115 int SetUpVRMLPhysVec(int nb,
00116 char **names,
00117 double *rot,
00118 double *pos,
00119 double *scale,
00120 double *RGB);
00121
00122
00130 int WriteVRMLPhysVec(FILE *f,
00131 int index,
00132 char *name,
00133 double *data);
00134
00146 int WriteVRMLInterpolator(FILE *f,
00147 enum InterpType type,
00148 int index,
00149 char *name,
00150 int nbItems,
00151 int nbSamples,
00152 double *data);
00153
00154
00155
00156
00157
00164 int CreateVRML( );
00165
00173 extern void
00174 HAnimPosition(double *Pos, double*q);
00175
00183 extern void
00184 HAnimOrientations(double *Or, double *q);
00185
00196 extern void
00197 HAnimVPos(double *VPOS, double *Lambda, double *q);
00198
00208 extern void
00209 HAnimVScale(double *VScale, double *Lambda, double *q);
00210
00220 extern void
00221 HAnimVRot(double *VRot, double *Lambda, double *q);
00222
00223 #endif // CREATE_VRML_H