FreeWRL / FreeX3D 4.3.0
Component_Geospatial.h
1/*
2
3
4Proximity sensor macro.
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
29#ifndef __FREEWRL_SCENEGRAPH_GEOSPATIAL_H__
30#define __FREEWRL_SCENEGRAPH_GEOSPATIAL_H__
31
32
33
34int checkX3DGeoElevationGridFields (struct X3D_GeoElevationGrid *node, float **points, int *npoints);
35void compile_geoSystem (struct X3D_Node *, int nodeType, struct Multi_String *args, struct X3D_Node **srf);
36struct _geosys;
37typedef struct _geosys Geosys;
38
39#define GEOSYS( geosystem ) ((Geosys *)geosystem)
40void update_origin(Geosys *geoSystem, struct X3D_Node *node, struct SFVec3d *userCoord, struct X3D_GeoOrigin *geoOrigin);
41
42//void user2gd(Geosys * geoSystem, struct SFVec3d *geo, int n, struct SFVec3d *gd);
43//void gd2user(Geosys * geoSystem, struct SFVec3d *gd, int n, struct SFVec3d *geo);
44void user2gc(Geosys * geoSystem, struct SFVec3d *geo, int n, struct SFVec3d *gc);
45void gc2user(Geosys * geoSystem, struct SFVec3d *gc, int n, struct SFVec3d *geo);
46void gc2lcs(Geosys * geoSystem, struct SFVec3d *gc, int n, struct SFVec3d *lcs);
47void lcs2gc(Geosys * geoSystem, struct SFVec3d *lcs, int n, struct SFVec3d *gc);
48void gd2gc(Geosys * geoSystem, struct SFVec3d *gd, int n, struct SFVec3d *gc);
49void gc2gd(Geosys * geoSystem, struct SFVec3d *gc, int n, struct SFVec3d *gd);
50void gc2tcs(Geosys * geoSystem, struct SFVec3d *gdcenter, struct SFVec3d *gc, int n, struct SFVec3d *tcs);
51void tcs2gc(Geosys * geoSystem, struct SFVec3d *gdcenter, struct SFVec3d *tcs, int n, struct SFVec3d *gc);
52void lcs2gc_transform(struct SFVec4d *rotation, struct SFVec3d *translation);
53void gc2lcs_transform(struct SFVec3d *translate, struct SFVec4d *rotate);
54void gc2tcs_transform(Geosys * geoSystem, struct SFVec3d *gdcenter, struct SFVec3d *translate, struct SFVec4d *rotate);
55void tcs2gc_transform(Geosys * geoSystem, struct SFVec3d *gdcenter, struct SFVec4d *rotate, struct SFVec3d *translate);
56void geoprep(Geosys *geoSystem, struct SFVec3d *userCoord);
57void geofin(Geosys *geoSystem, struct SFVec3d *userCoord);
58void geoprepT(Geosys *geoSystem, struct SFVec3d *userCoord);
59void geofinT(Geosys *geoSystem, struct SFVec3d *userCoord);
60void tcs2gcB_transform(Geosys *geoSystem, struct SFVec3d *gcCoord, struct SFVec3d* translate, struct SFVec4d *rotate);
61void gc2tcsB_transform(Geosys *geoSystem, struct SFVec3d *gcCoord, struct SFVec3d* translate, struct SFVec4d *rotate);
62void tcs2gcB(Geosys * geoSystem, struct SFVec3d *gccenter, struct SFVec3d *tcs, int n, struct SFVec3d *gc);
63void gc2tcsB(Geosys * geoSystem, struct SFVec3d *gccenter, struct SFVec3d *gc, int n, struct SFVec3d *tcs);
64
65#endif /* __FREEWRL_SCENEGRAPH_GEOSPATIAL_H__ */