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

Generated on Wed May 31 15:26:38 2006 for TNTsdk by  doxygen 1.3.8-20040913