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