00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00034
#ifndef LIBVRMLTREE_H
00035 #define LIBVRMLTREE_H 1
00037
#include <errno.h>
00038
#include <float.h>
00039
#include <math.h>
00040
#include <signal.h>
00041
#include <stdio.h>
00042
#include <stdlib.h>
00043
#include <string.h>
00044
#include <sysexits.h>
00045
#include <time.h>
00046
00047
#include "vrmltypes.h"
00048
00049
00050 #define MAXINSTANCE 500
00051 #define NODE_ORDER_ERROR 3
00052 #define MAX_INLINE_DEPTH 10
00054 #define INLINE_FOUND 1
00055 #define INLINE_NOT_FOUND 0
00057
void vrmlinline(void);
00058
node*
createNode(
char *, node_type);
00059
void btf(
void);
00060
void initLexer(
void);
00061
void test(
void*);
00062
void analize(
void);
00063
00064
00065
00066 typedef float vector[4];
00067 typedef float vrmlMatrix[4][4];
00069
vector*
make_vector (
sfvec3f);
00070
vrmlMatrix*
make_identity(
void);
00071
void negate(vrmlMatrix);
00072
void matrix_premul(vrmlMatrix, vrmlMatrix);
00073
vrmlMatrix*
make_rot_matrix (
sfrotation);
00074
vrmlMatrix*
make_scale_matrix(
sfvec3f);
00075
vrmlMatrix*
make_translation_matrix(
sfvec3f);
00076
vrmlMatrix*
make_transform_matrix(
00077 vrmlMatrix ,
00078 vrmlMatrix ,
00079 vrmlMatrix ,
00080 vrmlMatrix ,
00081 vrmlMatrix ,
00082 vrmlMatrix );
00083
float det(vrmlMatrix );
00084
float det_minor(vrmlMatrix,
int,
int,
int,
int,
int,
int);
00085
00086
00087
00088 #define OUTFILE "mem-print.wrl"
00089
int mem_print();
00090
int exploreout(
node* what);
00091
00092
00093
00094
int addchild(
node*,
node*);
00095
int tree_init(
void);
00096
node*
mknode(
void);
00097
node*
getsymFromRoot(
char*);
00098
node*
getsym(
char*,
node*);
00099
node*
genUse(
node*);
00100
node*
getInline(
node*);
00101
node*
lastin (
node*);
00102
int cleanup_tree(
void);
00103
int cleanup(
node*);
00104
00105
00106
char*
strduplicate(
char*);
00107
int minus(
int,
int );
00108
00109
#endif