00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef INC_GRE_3DSRTEX_H
00048 #define INC_GRE_3DSRTEX_H
00049
00050 #ifndef INC_GRE_3DTEXTUR_H
00051 #include <gre/3dtextur.h>
00052 #endif
00053
00054 #ifndef INC_RVC_RASTER_H
00055 #include <rvc/raster.h>
00056 #endif
00057
00058 #ifndef INC_RVC_NULLMASK_H
00059 #include <rvc/nullmask.h>
00060 #endif
00061
00062 #ifndef INC_MI32_CONTRASTPARM_H
00063 #include <mi32/contrastparm.h>
00064 #endif
00065
00066 struct COLORCOMPSTRUCT;
00067
00068 namespace GRE {
00069
00070 class SIMPLERASTER : public TEXTURE {
00071 public:
00072
00073 SIMPLERASTER (
00074 );
00075
00076 virtual ~SIMPLERASTER (
00077 );
00078
00079 private:
00080 #ifndef GENERATING_DOXYGEN_OUTPUT
00081
00082 struct COMPONENT {
00083 SIMPLE_ARRAY<RVC::RASTER*> m_ImageMap;
00084 RVC::IMAGE::CONVMODE m_Convert;
00085 RVC::NULLMASK m_NullMask;
00086 bool m_DoShading;
00087
00088 COMPONENT ();
00089
00090 ~COMPONENT ();
00091
00092 };
00093
00094 const GRE::LAYER_RASTER *m_Layer;
00095 DRECT2D ALIGN16(m_Extents);
00096 SPATREF::COORDREFSYS m_CoordRefSys;
00097 TRANS2D_MAPGEN m_Transformation;
00098
00099 COLORCOMPSTRUCT *m_CCHandle;
00100
00101 RVC::RASTER m_Mask;
00102 bool m_IsMasked;
00103 bool m_IsNullTransparent;
00104 bool m_UseTempRaster;
00105
00106 double ALIGN8(m_Opacity);
00107
00108 INT32 m_NumComponents;
00109 COMPONENT m_Single;
00110 COMPONENT m_Multiple[4];
00111
00112 bool m_DoShading;
00113 CONTRASTPARM m_ContrastParmShade;
00114
00115 SIMPLERASTER (
00116 const SIMPLERASTER& rhs
00117 );
00118
00119 SIMPLERASTER& operator= (
00120 const SIMPLERASTER& rhs
00121 );
00122
00123 ERRVALUE CreateSingle (
00124 );
00125
00126 ERRVALUE CreateMultiple (
00127 );
00128
00129 void FreeSingle (
00130 );
00131
00132 void FreeMultiple (
00133 );
00134
00135 ERRVALUE BeginSingle (
00136 );
00137
00138 ERRVALUE BeginMultiple (
00139 );
00140
00141 bool GetColorSingle (
00142 const INT32 line,
00143 const INT32 column,
00144 const UINT8 depth,
00145 const UINT8 mask,
00146 COLOR& color
00147 );
00148
00149 bool GetColorMultiple (
00150 const INT32 line,
00151 const INT32 column,
00152 const UINT8 depth,
00153 const UINT8 mask,
00154 COLOR& color
00155 );
00156
00157 UINT8 CheckDepthSingle (
00158 const UINT8 depth
00159 );
00160
00161 UINT8 CheckDepthMultiple (
00162 const UINT8 depth
00163 );
00164
00165 ERRVALUE UpdateExtents (
00166 TRANS2D_MAPGEN& transformation,
00167 DRECT2D& extents
00168 );
00169
00170 TEXTURE* v_CreateInstance (
00171 ) { return new SIMPLERASTER(); };
00172
00173 ERRVALUE v_Build (
00174 const GRE::LAYER *layer
00175 );
00176
00177 void v_Free (
00178 );
00179
00180 void v_Begin (
00181 const SCENE3D& scene
00182 );
00183
00184 void v_End (
00185 );
00186
00187 const DRECT2D& v_GetExtents (
00188 ) { return m_Extents; };
00189
00190 void v_CreateBoundary (
00191 REGION2D& boundary
00192 );
00193
00194 void v_SetCoordRefSys (
00195 const SPATREF::COORDREFSYS& CoordRefSys
00196 );
00197
00198 const SPATREF::COORDREFSYS v_GetCoordRefSys (
00199 ) { return m_CoordRefSys; };
00200
00201 bool v_GetColor (
00202 const INT32 line,
00203 const INT32 column,
00204 const UINT8 depth,
00205 COLOR& color
00206 );
00207
00208 bool v_GetColor (
00209 const DPOINT2D& point,
00210 const UINT8 depth,
00211 COLOR& color
00212 );
00213
00214 UINT8 v_CheckDepth (
00215 const UINT8 depth
00216 );
00217
00218 const TRANS2D_MAPGEN& v_GetTransformationInternalToModel (
00219 ) { return m_Transformation; };
00220
00221 #endif // GENERATING_DOXYGEN_OUTPUT
00222
00223 };
00224
00225 }
00226
00227 #endif