3ddtter.h

Go to the documentation of this file.
00001 /**
00002  * \file 3ddtter.h <gre/3ddtter.h>
00003  * \brief Dense Triangulation
00004  *
00005  * \if NODOC
00006  * $Id: 3ddtter.h_v 1.9 2004/09/03 16:54:57 vdronov Exp $
00007  *
00008  * $Log: 3ddtter.h_v $
00009  * Revision 1.9  2004/09/03 16:54:57  vdronov
00010  * *** empty log message ***
00011  *
00012  * Revision 1.8  2004/08/11 22:59:31  vdronov
00013  * *** empty log message ***
00014  *
00015  * Revision 1.7  2004/07/30 19:06:24  vdronov
00016  * *** empty log message ***
00017  *
00018  * Revision 1.6  2004/06/29 14:38:40  vdronov
00019  * *** empty log message ***
00020  *
00021  * Revision 1.5  2003/09/15 13:48:59  fileserver!dwilliss
00022  * Doxygen
00023  *
00024  * Revision 1.4  2003/08/15 15:47:30  vdronov
00025  * nc
00026  *
00027  * Revision 1.3  2003/07/30 13:38:46  mju
00028  * Check inclusion guards.
00029  * Ignore private section.
00030  *
00031  * Revision 1.1  2003/05/05 20:02:57  vdronov
00032  * Initial revision
00033  * \endif
00034 **/ 
00035 
00036 #ifndef  INC_GRE_3DDTTER_H
00037 #define  INC_GRE_3DDTTER_H
00038 
00039 #ifndef  INC_GRE_3DTERRA_H
00040 #include <gre/3dterra.h>
00041 #endif
00042 
00043 #ifndef  INC_GRE_3DSCENE_H
00044 #include <gre/3dscene.h>
00045 #endif
00046 
00047 #ifndef  INC_MI32_ASURFACE_H
00048 #include <mi32/asurface.h>
00049 #endif
00050 
00051 #ifndef  INC_MI32_SIMPLEAR_H
00052 #include <mi32/simplear.h>
00053 #endif
00054 
00055 #ifndef  INC_RVC_OBJECT_H
00056 #include <rvc/object.h>
00057 #endif
00058 
00059 #ifndef  INC_RVC_GEOREFER_H
00060 #include <rvc/georefer.h>
00061 #endif
00062 
00063 namespace GRE {
00064 
00065 //! Dense triangulation terrain model.
00066 class DENSETRIANGULATION : public TERRAIN {
00067    public:
00068 
00069       DENSETRIANGULATION (                         //! Constructor 
00070          );
00071 
00072       ~DENSETRIANGULATION (                        //! Destructor 
00073          );
00074 
00075    private:
00076       #ifndef GENERATING_DOXYGEN_OUTPUT
00077 
00078       ABSTRACT_SURFACE *m_Surface;
00079       DRECT3D m_Extents;
00080       SPATREF::COORDREFSYS m_CoordRefSys;
00081       TRANS2D_MAPGEN m_Transformation;
00082 
00083       RVC::RASTER m_Raster;
00084 
00085       INT32 m_XBlocks;
00086       INT32 m_YBlocks;
00087       INT32 m_BlockSize;
00088       BITSET m_BlockBits;  
00089       DOUBLE_ARRAY<DRECT3D> m_Blocks;
00090 
00091       DOUBLE_ARRAY<double> m_Buffer;
00092 
00093       TRIANGULATION m_Triangulation;
00094       SCENE3D *m_Scene;
00095 
00096       double m_ZMin;
00097       double m_ZMax;
00098       bool m_HasNullValue;
00099       double m_NullValue;
00100       UINT8 m_BytesPerCell;
00101 
00102       DENSETRIANGULATION& operator= (              //! Assignment operator (not implemented)
00103          const DENSETRIANGULATION& rhs
00104          );
00105 
00106       static void GetCorners (
00107          const DRECT3D& rect,
00108          DPOINT3D points[8]
00109          );
00110 
00111       TERRAIN* v_CreateInstance (
00112          ) { return new DENSETRIANGULATION(); };
00113 
00114       ERRVALUE v_Build (
00115          const GRE_LAYER *layer
00116          );
00117 
00118       bool v_IsObjectTypeSupported (
00119          const RVC::OBJTYPE objtype
00120          ) const { return (objtype == RVC::OBJTYPE_Raster); };
00121 
00122       void v_Free (
00123          );
00124 
00125       ERRVALUE Create (              
00126          const GRE_LAYER *layer
00127          );
00128 
00129       void Delete (               
00130          );
00131 
00132       ERRVALUE v_GetDefaultScene ( 
00133          SCENE3D& scene
00134          ) const;
00135 
00136       ERRVALUE v_SetScene (
00137          const SCENE3D& scene,
00138          const SIMPLE_ARRAY<TEXTURE*> &textures   
00139          );
00140 
00141       ERRVALUE v_DrawScene (
00142          CONTROLLER &controller,        
00143          DRAWINGCONTEXT3D& drawing,
00144          TEXTURE* texture,
00145          TEXTUREFILTER* texturefilter
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       void v_SetCoordRefSys (
00168          const SPATREF::COORDREFSYS& CoordRefSys
00169          );
00170 
00171       const SPATREF::COORDREFSYS v_GetCoordRefSys (
00172          ) const { return m_CoordRefSys; };
00173 
00174       const DRECT3D& v_GetExtents (
00175          ) { return m_Extents; };
00176 
00177       void v_CreateBoundary (
00178          REGION2D& boundary
00179          );
00180 
00181       bool v_HasNull (
00182          ) const { return m_HasNullValue; };
00183 
00184       bool v_IsNull (
00185          const float x,
00186          const float y
00187          ) const;
00188 
00189       ERRVALUE CreateBlocks (
00190          const TRANS2D_MAPGEN& transformation
00191          );
00192 
00193       void DeleteBlocks (
00194          );
00195       ERRVALUE SetSceneForBlocks (
00196          const SCENE3D& scene,
00197          const SIMPLE_ARRAY<TEXTURE*> &textures   
00198          );
00199 
00200       ERRVALUE DrawSceneForBlocks (
00201          CONTROLLER &controller,        
00202          DRAWINGCONTEXT3D& drawing,
00203          TEXTURE* texture,
00204          TEXTUREFILTER* texturefilter
00205          );
00206 
00207       void TransformBlocks (
00208          const TRANS2D_MAPGEN& transformation
00209          );
00210 
00211    #endif //!< GENERATING_DOXYGEN_OUTPUT
00212    };
00213 
00214 };    //! End of namespace
00215 
00216 #endif
00217 

Generated on Tue Dec 14 13:18:11 2004 for TNTsdk by  doxygen 1.3.8-20040913