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

Generated on Thu Apr 26 04:44:38 2007 for TNTsdk by  doxygen 1.5.2