3dsrtex.h

Go to the documentation of this file.
00001 /*** 
00002  * \file gre/3dsrtex.h
00003  * \brief SIMPLERASTER texturing algorithms
00004  *
00005  * \if NODOC
00006  * $Id: 3dsrtex.h_v 1.16 2004/07/30 19:09:16 vdronov Exp $
00007  *
00008  * $Log: 3dsrtex.h_v $
00009  * Revision 1.16  2004/07/30 19:09:16  vdronov
00010  * *** empty log message ***
00011  *
00012  * Revision 1.15  2004/07/02 18:02:31  vdronov
00013  * added UpdateExtents
00014  *
00015  * Revision 1.14  2004/06/29 13:35:34  vdronov
00016  * *** empty log message ***
00017  *
00018  * Revision 1.13  2004/06/18 21:11:44  vdronov
00019  * added relief shading
00020  *
00021  * Revision 1.12  2004/06/10 19:20:55  vdronov
00022  * added m_Opacity;.
00023  *
00024  * Revision 1.11  2003/10/02 16:18:21  linux32build!build
00025  * Doxygen
00026  *
00027  * Revision 1.10  2003/09/15 13:48:59  fileserver!dwilliss
00028  * Doxygen
00029  *
00030  * Revision 1.9  2003/08/15 17:51:52  vdronov
00031  * small changes
00032  *
00033  * Revision 1.8  2003/07/30 14:09:39  mju
00034  * Check inclusion guards.
00035  * Ignore private section.
00036  *
00037  * Revision 1.7  2003/03/31 21:41:41  vdronov
00038  * nc
00039  *
00040  * Revision 1.6  2003/03/31 18:13:37  vdronov
00041  * nullvalue transparency
00042  *
00043  * Revision 1.5  2003/03/31 16:43:29  vdronov
00044  * multicomponent amd mask support
00045  *
00046  * Revision 1.4  2003/03/25 23:35:59  vdronov
00047  * multiple updates
00048  *
00049  * Revision 1.1  2003/03/10 15:07:26  vdronov
00050  * Initial revision
00051  * \endif
00052 **/ 
00053 
00054 #ifndef  INC_GRE_3DSRTEX_H
00055 #define  INC_GRE_3DSRTEX_H
00056 
00057 #ifndef  INC_GRE_3DTEXTUR_H
00058 #include <gre/3dtextur.h>
00059 #endif
00060 
00061 #ifndef  INC_MI32_COLRCONV_H
00062 #include <mi32/colrconv.h>
00063 #endif
00064 
00065 #ifndef GENERATING_DOXYGEN_OUTPUT
00066 class GRE_LAYER_RASTER;
00067 #endif // GENERATING_DOXYGEN_OUTPUT
00068 
00069 namespace GRE {
00070 
00071 class SIMPLERASTER : public TEXTURE {
00072    public:
00073 
00074       SIMPLERASTER (                              
00075          );
00076 
00077       virtual ~SIMPLERASTER (                      //! Destructor
00078          );
00079 
00080    private:
00081       #ifndef GENERATING_DOXYGEN_OUTPUT
00082 
00083       struct COMPONENT {
00084          SIMPLE_ARRAY<RVC::RASTER*> m_ImageMap;
00085          RVC::IMAGE::CONVMODE m_Convert;
00086          bool m_HasNullValue;
00087          ANYRASTVALUE m_NullValue;
00088          UINT8 m_BytesPerCell;
00089          bool m_DoShading;
00090 
00091          COMPONENT ();
00092 
00093          ~COMPONENT ();
00094 
00095          };
00096 
00097       const GRE_LAYER_RASTER *m_Layer;
00098       DRECT2D m_Extents;
00099       SPATREF::COORDREFSYS m_CoordRefSys;
00100       TRANS2D_MAPGEN m_Transformation;
00101 
00102       COLORCOMPHANDLE m_CCHandle;
00103 
00104       RVC::RASTER m_Mask;
00105       bool m_IsMasked;
00106 
00107       bool m_IsNullTransparent;
00108 
00109       double m_Opacity;
00110 
00111       INT32 m_NumComponents;
00112       COMPONENT m_Single;
00113       COMPONENT m_Multiple[4];
00114 
00115       bool m_DoShading;
00116       CONTPARM m_ShadeContParm;
00117 
00118       SIMPLERASTER (                               //! Copy constructor (not implemented)
00119          const SIMPLERASTER& rhs
00120          );
00121 
00122       SIMPLERASTER& operator= (                       //! Assignment operator (not implemented)
00123          const SIMPLERASTER& rhs
00124          );
00125 
00126       ERRVALUE CreateSingle (
00127          );
00128 
00129       ERRVALUE CreateMultiple (
00130          );
00131 
00132       void FreeSingle (
00133          );
00134 
00135       void FreeMultiple (
00136          );
00137 
00138       ERRVALUE BeginSingle (
00139          );
00140 
00141       ERRVALUE BeginMultiple (
00142          );
00143 
00144       bool GetColorSingle (
00145          const INT32 line,
00146          const INT32 column,
00147          const UINT8 depth,
00148          const UINT8 mask,
00149          COLOR& color 
00150          );
00151 
00152       bool GetColorMultiple (
00153          const INT32 line,
00154          const INT32 column,
00155          const UINT8 depth,
00156          const UINT8 mask,
00157          COLOR& color 
00158          );
00159 
00160       UINT8 CheckDepthSingle (
00161          const UINT8 depth
00162          );
00163 
00164       UINT8 CheckDepthMultiple (
00165          const UINT8 depth
00166          );
00167 
00168       ERRVALUE UpdateExtents (
00169          TRANS2D_MAPGEN& transformation, 
00170          DRECT2D& extents
00171             );
00172 
00173       TEXTURE* v_CreateInstance (
00174          ) { return new SIMPLERASTER(); };
00175 
00176       ERRVALUE v_Build (
00177          const GRE_LAYER *layer
00178          );
00179 
00180       void v_Free (
00181          );
00182 
00183       void v_Begin (
00184          const SCENE3D& scene
00185          );
00186 
00187       void v_End (
00188          );
00189 
00190       const DRECT2D& v_GetExtents (
00191          ) { return m_Extents; };
00192 
00193       void v_CreateBoundary (
00194          REGION2D& boundary
00195          );
00196 
00197       void v_SetCoordRefSys (
00198          const SPATREF::COORDREFSYS& CoordRefSys
00199          );
00200 
00201       const SPATREF::COORDREFSYS v_GetCoordRefSys (
00202          ) { return m_CoordRefSys; };
00203 
00204       bool v_GetColor (
00205          const INT32 line,
00206          const INT32 column,
00207          const UINT8 depth,
00208          COLOR& color 
00209          );
00210 
00211       bool v_GetColor (
00212          const DPOINT2D& point,
00213          const UINT8 depth,
00214          COLOR& color 
00215          );
00216 
00217       UINT8 v_CheckDepth (
00218          const UINT8 depth
00219          );
00220 
00221       const TRANS2D_MAPGEN& v_GetTransformationInternalToModel (
00222          ) { return m_Transformation; };
00223 
00224       #endif // GENERATING_DOXYGEN_OUTPUT
00225 
00226    };
00227 
00228 }     // End of GRE namespace
00229 
00230 #endif
00231 
00232 
00233 

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