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

Generated on Thu Apr 26 04:03:29 2007 for TNTsdk by  doxygen 1.5.2