-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.h
132 lines (123 loc) · 2.12 KB
/
parser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef PARSER_H
#define PARSER_H
#include "symtab.h"
#define MAX_COMMANDS 512
extern long int lastop;
#define Ka 0
#define Kd 1
#define Ks 2
struct command
{
long int opcode;
union
{
struct {
SYMTAB *p;
double c[4];
} light;
struct {
double c[4];
} ambient;
struct {
SYMTAB *p;
/* each triple holds ka kd and ks for red green and blue
respectively */
} constants;
struct {
SYMTAB *p;
} save_coordinate_system;
struct {
double eye[4],aim[4];
} camera;
struct {
SYMTAB *constants;
double d[4];
double r;
SYMTAB *cs;
} sphere;
struct {
SYMTAB *constants;
double d0[3];
double d1[3];
double d2[3];
double d3[3];
SYMTAB *p;
SYMTAB *cs;
} texture;
struct {
SYMTAB *constants;
double d[4];
double r0,r1;
SYMTAB *cs;
} torus;
struct {
SYMTAB *constants;
double d0[4],d1[4];
SYMTAB *cs;
} box;
struct {
SYMTAB *constants;
double p0[4],p1[4];
SYMTAB *cs0,*cs1;
} line;
struct {
SYMTAB *constants;
char name[255];
SYMTAB *cs;
} mesh;
struct {
SYMTAB *p;
double val;
} set;
struct {
double d[4];
SYMTAB *p;
} move;
struct {
double d[4];
SYMTAB *p;
} scale;
struct {
double axis;
double degrees;
SYMTAB *p;
} rotate;
struct {
SYMTAB *p;
} basename;
struct {
SYMTAB *p;
} save_knobs;
struct {
double start_frame, end_frame;
SYMTAB *knob_list0;
SYMTAB *knob_list1;
} tween;
struct {
double num_frames;
}frames;
struct {
SYMTAB *p;
double start_frame, end_frame, start_val, end_val;
} vary;
struct {
SYMTAB *p;
} save;
struct {
SYMTAB *p;
} shading;
struct {
double value;
} setknobs;
struct {
double value;
} focal;
} op;
};
struct vary_node {
char name[128];
double value;
struct vary_node *next;
};
extern struct command op[MAX_COMMANDS];
#endif