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