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
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
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 (
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 (
00151 const SIMPLERASTER& rhs
00152 );
00153
00154 SIMPLERASTER& operator= (
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 }
00261
00262 #endif
00263
00264
00265