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