00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifndef INC_GRE_3DPWTER_H
00046 #define INC_GRE_3DPWTER_H
00047
00048 #ifndef INC_GRE_3DTERRA_H
00049 #include <gre/3dterra.h>
00050 #endif
00051
00052 #ifndef INC_GRE_3DSCENE_H
00053 #include <gre/3dscene.h>
00054 #endif
00055
00056 #ifndef INC_MI32_ASURFACE_H
00057 #include <mi32/asurface.h>
00058 #endif
00059
00060 #ifndef INC_MI32_SIMPLEAR_H
00061 #include <mi32/simplear.h>
00062 #endif
00063
00064 #ifndef INC_RVC_GEOREFER_H
00065 #include <rvc/georefer.h>
00066 #endif
00067
00068 namespace GRE {
00069
00070
00071 class PIECEWISETIN : public TERRAIN {
00072 public:
00073
00074 PIECEWISETIN (
00075 );
00076
00077 ~PIECEWISETIN (
00078 );
00079
00080 private:
00081 #ifndef GENERATING_DOXYGEN_OUTPUT
00082
00083 ABSTRACT_SURFACE *m_Surface;
00084 DRECT3D ALIGN16(m_Extents);
00085 SPATREF::COORDREFSYS m_CoordRefSys;
00086 TRANS2D_MAPGEN m_Transformation;
00087
00088 RVC::RASTER m_Raster;
00089 GRE::LAYER* m_Layer;
00090
00091 TRIANGULATION m_Triangulation;
00092 DOUBLE_ARRAY<DPOINT3D> m_Nodes;
00093 SIMPLE_ARRAY<EDGEINDEX> m_Edges;
00094 BITSET m_EdgesBits;
00095 SIMPLE_ARRAY<TRIANGLEINDEX> m_Triangles;
00096 BITSET m_TrianglesBits;
00097 SCENE3D *m_Scene;
00098
00099 PIECEWISETIN& operator= (
00100 const PIECEWISETIN& rhs
00101 );
00102
00103 TERRAIN* v_CreateInstance (
00104 ) { return new PIECEWISETIN(); };
00105
00106 ERRVALUE v_Build (
00107 const GRE::LAYER *layer
00108 );
00109
00110 bool v_IsObjectTypeSupported (
00111 const RVC::OBJTYPE objtype
00112 ) const { return (objtype == RVC::OBJTYPE_Raster); };
00113
00114 void v_Free (
00115 );
00116
00117 ERRVALUE Create (
00118 const GRE::LAYER *layer
00119 );
00120
00121 void Delete (
00122 );
00123
00124 ERRVALUE v_GetDefaultScene (
00125 SCENE3D& scene
00126 ) const;
00127
00128 ERRVALUE v_SetScene (
00129 const SCENE3D& scene,
00130 const SIMPLE_ARRAY<TEXTURE*> &textures
00131 );
00132
00133 ERRVALUE v_DrawScene (
00134 CONTROLLER &controller,
00135 DRAWINGCONTEXT3D& drawing,
00136 TEXTURE* texture,
00137 TEXTUREFILTER* texturefilter
00138 );
00139
00140 ERRVALUE v_SetScene (
00141 const SCENE3D& scene,
00142 const SIMPLE_ARRAY<GEOMETRIC3D*> &geometrics,
00143 const bool wireframe
00144 );
00145
00146 float v_GetElevation (
00147 const float x,
00148 const float y
00149 ) const;
00150
00151 ERRVALUE v_ComputeProfile (
00152 const POLYLINE& polyline,
00153 POLYLINE& profile,
00154 SIMPLE_ARRAY<INT32>& index
00155 );
00156
00157 float v_GetAngleToNorth (
00158 const float x,
00159 const float y
00160 ) const;
00161
00162 const ABSTRACT_SURFACE* v_GetAbstractSurface (
00163 ) { return m_Surface; }
00164
00165 void v_SetCoordRefSys (
00166 const SPATREF::COORDREFSYS& CoordRefSys
00167 );
00168
00169 const SPATREF::COORDREFSYS v_GetCoordRefSys (
00170 ) const { return m_CoordRefSys; };
00171
00172 const DRECT3D& v_GetExtents (
00173 ) { return m_Extents; };
00174
00175 void v_CreateBoundary (
00176 REGION2D& boundary
00177 );
00178
00179 bool v_HasNull (
00180 ) const { return false; };
00181
00182 bool v_IsNull (
00183 const float x,
00184 const float y
00185 ) const { return false; };
00186
00187 ERRVALUE CreateRegularTIN (
00188 );
00189
00190 void DeleteRegularTIN (
00191 );
00192 ERRVALUE SetSceneForRegularTIN (
00193 const SCENE3D& scene,
00194 const SIMPLE_ARRAY<TEXTURE*> &textures
00195 );
00196
00197 ERRVALUE DrawSceneForRegularTIN (
00198 CONTROLLER &controller,
00199 DRAWINGCONTEXT3D& drawing,
00200 TEXTURE* texture,
00201 TEXTUREFILTER* texturefilter
00202 );
00203
00204 void TransformRegularTIN (
00205 const TRANS2D_MAPGEN& transformation
00206 );
00207
00208 #endif
00209 };
00210
00211 };
00212
00213 #endif
00214