File: TransType.h

package info (click to toggle)
freefem3d 1.0pre8-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,920 kB
  • ctags: 7,145
  • sloc: cpp: 45,748; sh: 8,698; yacc: 2,847; makefile: 600; ansic: 504; perl: 110
file content (47 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (7)
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
/* $Id: TransType.h,v 1.3 2004/02/01 19:24:58 delpinux Exp $ */


#ifndef _TRANSTYPE_HPP_
#define _TRANSTYPE_HPP_

#include <Types.hpp>

/*
  This must be defined separatly
  Because the lexer is generated in C code
*/

enum TransType {
  translation,
  rotation,
  scale,
  matrix
};

typedef struct parsetrans {
  int number;
#ifdef __cplusplus
  /* hack to provide single interface to C and C++ :-( */
  TransType* type;
#endif /* __cplusplus */
  real_t *vect[3];
  bool hasRef;   /* true if the object has a reference */
  bool inverse;  /* true if inverse */
  real_t ref[4]; /* The first 3 components contains the REF vector */
                 /* The other field is used to detect if the object is
		     to be taken into account in the scene */
  real_t mat[12];
} parsetrans;

typedef struct {
  char* name;
  int type; // 0 for real_t, 1 for char*
  union {
    real_t d;
    char* s;
  } val;
} variable;



#endif /* _TRANSTYPE_HPP_ */