25 #ifndef WIN32_LEAN_AND_MEAN
26 #define WIN32_LEAN_AND_MEAN
29 #define strdup _strdup
34 #include <sys/socket.h>
35 #include <netinet/in.h>
39 #include <sys/types.h>
125 #define REMOVE_EOT {char *lp; lp=strstr(ptr,"RE_EOT"); if (lp!=NULL) {lp--; *lp='\0';}};
126 #define SKIP_IF_GT_SPACE while (*ptr > ' ') ptr++;
127 #define SKIP_CONTROLCHARS while ((*ptr != '\0') && (*ptr <= ' ')) ptr++;
142 #define X3DEventIn struct _intX3DEventIn
143 #define X3DEventOut struct _intX3DEventIn
144 #define X3DFieldDef struct _intX3DEventIn
148 X3DNode *X3D_getNode (
char *name);
149 X3DNode *X3D_getExecutionContext();
150 void X3D_rootNodeHandling(
X3DNode* scene,
X3DNode* node,
int action);
151 X3DEventIn *X3D_getEventIn(
X3DNode *node,
char *name);
152 X3DEventOut *X3D_getEventOut(
X3DNode *node,
char *name);
153 void X3D_setValue (X3DEventIn *dest,
X3DNode *node);
154 void X3D_addRoute (X3DEventOut *from, X3DEventIn *to);
155 void X3D_deleteRoute (X3DEventOut *from, X3DEventIn *to);
156 char* X3D_getFieldDefs(
int nodeAdr);
157 X3DFieldDef* X3D_getFieldDef(
X3DNode *node,
char *name);
163 int X3D_getParentNodesbyName(
char *childName,
X3DNode** outChildNode,
X3DNode** outParentArray);
167 void X3D_initialize(
char *);
171 void* freewrlSwigThread(
void *);
173 int findFieldInFIELDTYPES(
char *fieldtype);
174 void X3D_freeNode(
X3DNode* node);
175 X3DNode* X3D_getValue (X3DEventOut *src);
177 void freewrlSwigThread(
void);
179 void *freewrlReadThread(
void*);
180 void *freewrlEVcallbackThread(
void*);
183 float X3D_getCurrentSpeed();
184 float X3D_getCurrentFrameRate();
187 void X3D_firstViewpoint();
188 void X3D_lastViewpoint();
189 void X3D_nextViewpoint();
190 void X3D_previousViewpoint();
191 void X3D_setDescription(
char *newDescription);
194 char *X3D_getDescription();
196 char *X3D_getVersion();
197 char *X3D_getWorldURL();
200 X3DNode *X3D_createVrmlFromString(
char *str);
201 X3DNode *X3D_createX3DFromString(
char *str);
202 X3DNode *X3D_newSFVec3f (
float a,
float b,
float c);
203 X3DNode *X3D_newSFColor (
float a,
float b,
float c);
204 X3DNode *X3D_newSFVec2f (
float a,
float b);
205 X3DNode *X3D_newSFRotation (
float a,
float b,
float c,
float d);
206 X3DNode *X3D_newSFColorRGBA (
float a,
float b,
float c,
float d);
207 X3DNode *X3D_newSFVec3d (
double a,
double b,
double c);
208 X3DNode *X3D_newSFVec2d (
double a,
double b);
209 X3DNode *X3D_newSFBool (
int a);
210 X3DNode *X3D_newSFFloat (
float a);
211 X3DNode *X3D_newSFTime (
double a);
212 X3DNode *X3D_newSFInt32 (
int a);
230 extern int _X3D_queryno;
231 extern int _X3D_FreeWRL_FD;
232 extern int _X3D_FreeWRL_Swig_FD;
234 int _X3D_countWords(
char *ptr);
235 char *_X3D_make1StringCommand (
char command,
char *name);
236 char *_X3D_make2StringCommand (
char command,
char *str1,
char *str2);
237 char *_X3D_Browser_SendEventType(
int adr,
char *name,
char *evtype);
238 char *_X3D_makeShortCommand (
char command);
239 void _X3D_sendEvent (
char command,
char *
string,
int li);
240 void _handleFreeWRLcallback(
char *
command);
242 void X3D_error(
char *msg);
243 char *fieldTypeName(
char type);
245 char * _RegisterListener (X3DEventOut *node,
int adin);
246 int X3DAdvise (X3DEventOut *node,
void *fn);
247 int X3DAdviseArg (X3DEventOut *node,
void *fn,
void* arg);
248 void _handleReWireCallback(
char *buf);
249 char mapFieldTypeToEAItype (
int st);
250 int mapEAItypeToFieldType (
char st);
251 X3DNode* X3D_getValue(X3DEventOut *src);
252 void X3D_freeEventIn(X3DEventIn* ev);
253 void X3D_freeEventOut(X3DEventOut* ev);
254 void X3D_freeNode(
X3DNode* node);
255 X3DNode* X3D_newSFVec3f(
float a,
float b,
float c);
256 void X3D_getSFVec3f(
X3DNode* node,
float* value);
257 X3DNode* X3D_newColor(
float a,
float b,
float c);
258 void X3D_getSFColor(
X3DNode* node,
float* value);
259 X3DNode* X3D_newSFVec2f(
float a,
float b);
260 void X3D_getSFVec2f(
X3DNode* node,
float* value);
261 X3DNode* X3D_newSFRotation(
float a,
float b,
float c,
float d);
262 void X3D_getSFRotation(
X3DNode* node,
float* value);
263 X3DNode* X3D_newSFColorRGBA(
float a,
float b,
float c,
float d);
264 void X3D_getSF(
X3DNode* node,
float* value);
266 void X3D_getSFBool(
X3DNode* node,
int* value);
267 X3DNode* X3D_newSFFloat(
float a);
268 void X3D_getSFFloat(
X3DNode* node,
float* value);
269 void X3D_getSFTime(
X3DNode* node,
double* value);
270 X3DNode* X3D_newSFTime(
double a);
271 X3DNode* X3D_newSFInt32(
int a);
272 void X3D_getSFInt32(
X3DNode* node,
int* value);
273 X3DNode* X3D_newSFString(
char* a);
274 char* X3D_getSFString(
X3DNode* node);
275 X3DNode* X3D_newMFInt32(
int num,
int* array);
276 void X3D_getMFInt32(
X3DNode*,
int** array,
int* num);
277 X3DNode* X3D_newMFFloat(
int num,
float* array);
278 void X3D_getMFFloat(
X3DNode*,
float** array,
int* num);
279 X3DNode* X3D_newMFVec3f(
int num,
float(* array)[3]);
280 void X3D_getMFVec3f(
X3DNode*,
float*** array,
int* num);
281 X3DNode* X3D_newMFColor(
int num,
float(* array)[3]);
282 void X3D_getMFColor(
X3DNode*,
float*** array,
int* num);
283 X3DNode* X3D_newMFVec2f(
int num,
float(* array)[2]);
284 void X3D_getMFVec2f(
X3DNode*,
float*** array,
int* num);
285 X3DNode* X3D_newMFRotation(
int num,
float(* array)[4]);
286 void X3D_getMFRotation(
X3DNode*,
float*** array,
int* num);
287 X3DNode* X3D_newMFColorRGBA(
int num,
float(* array)[4]);
288 void X3D_getMFColorRGBA(
X3DNode*,
float*** array,
int* num);
289 X3DNode* X3D_newMFBool(
int num,
int* array);
290 void X3D_getMFBool(
X3DNode*,
int** array,
int* num);
291 X3DNode* X3D_newMFVec3d(
int num,
double(* array)[3]);
292 void X3D_getMFVec3d(
X3DNode*,
double*** array,
int* num);
293 X3DNode* X3D_newMFString(
int num,
char array[][STRLEN]);
294 void X3D_getMFString(
X3DNode* node,
char*** array,
int* num);