FreeWRL/FreeX3D  3.0.0
Bindable.h
1 /*
2 
3 
4 Bindable nodes - Background, TextureBackground, Fog, NavigationInfo, Viewpoint.
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 #ifndef __FREEWRL_BINDABLE_H__
29 #define __FREEWRL_BINDABLE_H__
30 
31 
32 /* Bind stack */
33 
34 void
35 reset_upvector(void);
36 
37 void
38 set_naviinfo(struct X3D_NavigationInfo *node);
39 
40 void
41 send_bind_to(struct X3D_Node *node, int value);
42 
43 void
44 bind_node(struct X3D_Node *node, struct Vector *stack);
45 
46 void
47 render_Fog(struct X3D_Fog *node);
48 
49 void
50 render_NavigationInfo(struct X3D_NavigationInfo *node);
51 
52 void render_Background(struct X3D_Background *node);
53 void render_TextureBackground(struct X3D_TextureBackground *node);
54 
55 void set_naviWidthHeightStep(double wid, double hei, double step) ;
56 
57 typedef struct bindablestack {
58  void *background;
59  void *viewpoint;
60  void *fog;
61  void *navigation;
62  int layerId;
63 
64  double screenorientationmatrix[16];
65  double viewtransformmatrix[16];
66  double posorimatrix[16];
67  double stereooffsetmatrix[2][16];
68  int isStereo; //temp
69  int iside; //temp
70  int nodetype; //node_layer or node_layoutlayer, affects viewer init to ortho or viewpoint
71  void *viewer; //X3D_Viewer - navigation is per-layer
72  double pickraymatrix[2][16];
74 void init_bindablestack(bindablestack *bstack, int layerId, int nodetype);
75 bindablestack* getBindableStacksByLayer(ttglobal tg, int layerId );
76 bindablestack* getActiveBindableStacks(ttglobal tg );
77 int addBindableStack(ttglobal tg, bindablestack* bstack);
78 int getBindableStacksCount(ttglobal tg);
79 int layerFromBindable(struct X3D_Node*);
80 #endif /* __FREEWRL_BINDABLE_H__ */
Definition: Viewer.h:196
Definition: Vector.h:36