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 #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 (
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 (
00129 const SIMPLERASTER& rhs
00130 );
00131
00132 SIMPLERASTER& operator= (
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 }
00239
00240 #endif
00241
00242
00243