FreeWRL/FreeX3D  3.0.0
Polyrep.h
1 /*
2 
3 
4 Polyrep ???
5 
6 */
7 
8 /****************************************************************************
9  This file is part of the FreeWRL/FreeX3D Distribution.
10 
11  Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
12 
13  FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
14  it under the terms of the GNU Lesser Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  FreeWRL/FreeX3D is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
25 ****************************************************************************/
26 
27 
28 #include <config.h>
29 #include <display.h>
30 #include <internal.h>
31 
32 #include <libFreeWRL.h>
33 
34 #include "../vrml_parser/Structs.h"
35 #include "../main/headers.h"
36 #include "LinearAlgebra.h"
37 
38 
39 /* transformed ray */
40 //extern struct point_XYZ t_r1;
41 //extern struct point_XYZ t_r2;
42 //extern struct point_XYZ t_r3;
43 
44 
45 
46 int count_IFS_faces(int cin, struct Multi_Int32 *coordIndex);
47 
48 int
49 IFS_face_normals(struct point_XYZ *facenormals,
50  int *faceok,
51  int *pointfaces,
52  int faces,
53  int npoints,
54  int cin,
55  struct SFVec3f *points,
56  struct Multi_Int32 *coordIndex,
57  int ccw);
58 
59 void
60 IFS_check_normal(struct point_XYZ *facenormals,
61  int this_face,
62  struct SFVec3f *points,
63  int base,
64  struct Multi_Int32 *coordIndex,
65  int ccw);
66 
67 void
68 add_to_face(int point,
69  int face,
70  int *pointfaces);
71 
72 void
73 Elev_Tri(int vertex_ind,
74  int this_face,
75  int A,
76  int D,
77  int E,
78  int NONORMALS,
79  struct X3D_PolyRep *this_Elev,
80  struct point_XYZ *facenormals,
81  int *pointfaces,
82  int ccw);
83 
84 void
85 Extru_tex(int vertex_ind,
86  int tci_ct,
87  int A,
88  int B,
89  int C,
90  GLuint *tcindex,
91  int ccw,
92  int tcindexsize);
93 
94 void Extru_ST_map(
95  int triind_start,
96  int start,
97  int end,
98  float *Vals,
99  int nsec,
100  GLuint *tcindex,
101  GLuint *cindex,
102  float *GeneratedTexCoords,
103  int tcoordsize);
104 
105 void
106 Extru_check_normal(struct point_XYZ *facenormals,
107  int this_face,
108  int dire,
109  struct X3D_PolyRep *rep_,
110  int ccw);
111 
112 void
113 do_color_normal_reset(void);
114 
115 void
116 do_glNormal3fv(struct SFVec3f *dest, GLfloat *param);
117 
118 void stream_polyrep(void *node, void *coord, void *fogCoord, void *color, void *normal, struct X3D_TextureCoordinate *texCoord);
119 void compile_polyrep(void *node, void *coord, void *fogCoord, void *color, void *normal, struct X3D_TextureCoordinate *texCoord);
120 
122  float dist;
123  float p[3];
124  float normal[3];
125  float texcoord[3];
126 };
127 int intersect_polyrep2(struct X3D_Node *node, float *p1, float *p2, Stack *intersection_stack);
128 void render_ray_polyrep(void *node);
Definition: Vector.h:36