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 #ifndef INC_GRE_3DSRTEX_H
00064 #define INC_GRE_3DSRTEX_H
00065
00066 #ifndef INC_GRE_BASE_H
00067 #include <gre/base.h>
00068 #endif
00069
00070 #ifndef INC_GRE_3DTEXTUR_H
00071 #include <gre/3dtextur.h>
00072 #endif
00073
00074 #ifndef INC_MI32_COLRCONV_H
00075 #include <mi32/colrconv.h>
00076 #endif
00077
00078 namespace GRE {
00079
00080 class SIMPLERASTER : public TEXTURE {
00081 public:
00082
00083 SIMPLERASTER (
00084 );
00085
00086 virtual ~SIMPLERASTER (
00087 );
00088
00089 private:
00090 #ifndef GENERATING_DOXYGEN_OUTPUT
00091
00092 struct COMPONENT {
00093 SIMPLE_ARRAY<RVC::RASTER*> m_ImageMap;
00094 RVC::IMAGE::CONVMODE m_Convert;
00095 RVC::NULLMASK m_NullMask;
00096 bool m_DoShading;
00097
00098 COMPONENT ();
00099
00100 ~COMPONENT ();
00101
00102 };
00103
00104 const GRE_LAYER_RASTER *m_Layer;
00105 DRECT2D ALIGN16(m_Extents);
00106 SPATREF::COORDREFSYS m_CoordRefSys;
00107 TRANS2D_MAPGEN m_Transformation;
00108
00109 COLORCOMPHANDLE m_CCHandle;
00110
00111 RVC::RASTER m_Mask;
00112 bool m_IsMasked;
00113
00114 bool m_IsNullTransparent;
00115
00116 double ALIGN8(m_Opacity);
00117
00118 INT32 m_NumComponents;
00119 COMPONENT m_Single;
00120 COMPONENT m_Multiple[4];
00121
00122 bool m_DoShading;
00123 CONTPARM m_ShadeContParm;
00124
00125 SIMPLERASTER (
00126 const SIMPLERASTER& rhs
00127 );
00128
00129 SIMPLERASTER& operator= (
00130 const SIMPLERASTER& rhs
00131 );
00132
00133 ERRVALUE CreateSingle (
00134 );
00135
00136 ERRVALUE CreateMultiple (
00137 );
00138
00139 void FreeSingle (
00140 );
00141
00142 void FreeMultiple (
00143 );
00144
00145 ERRVALUE BeginSingle (
00146 );
00147
00148 ERRVALUE BeginMultiple (
00149 );
00150
00151 bool GetColorSingle (
00152 const INT32 line,
00153 const INT32 column,
00154 const UINT8 depth,
00155 const UINT8 mask,
00156 COLOR& color
00157 );
00158
00159 bool GetColorMultiple (
00160 const INT32 line,
00161 const INT32 column,
00162 const UINT8 depth,
00163 const UINT8 mask,
00164 COLOR& color
00165 );
00166
00167 UINT8 CheckDepthSingle (
00168 const UINT8 depth
00169 );
00170
00171 UINT8 CheckDepthMultiple (
00172 const UINT8 depth
00173 );
00174
00175 ERRVALUE UpdateExtents (
00176 TRANS2D_MAPGEN& transformation,
00177 DRECT2D& extents
00178 );
00179
00180 TEXTURE* v_CreateInstance (
00181 ) { return new SIMPLERASTER(); };
00182
00183 ERRVALUE v_Build (
00184 const GRE_LAYER *layer
00185 );
00186
00187 void v_Free (
00188 );
00189
00190 void v_Begin (
00191 const SCENE3D& scene
00192 );
00193
00194 void v_End (
00195 );
00196
00197 const DRECT2D& v_GetExtents (
00198 ) { return m_Extents; };
00199
00200 void v_CreateBoundary (
00201 REGION2D& boundary
00202 );
00203
00204 void v_SetCoordRefSys (
00205 const SPATREF::COORDREFSYS& CoordRefSys
00206 );
00207
00208 const SPATREF::COORDREFSYS v_GetCoordRefSys (
00209 ) { return m_CoordRefSys; };
00210
00211 bool v_GetColor (
00212 const INT32 line,
00213 const INT32 column,
00214 const UINT8 depth,
00215 COLOR& color
00216 );
00217
00218 bool v_GetColor (
00219 const DPOINT2D& point,
00220 const UINT8 depth,
00221 COLOR& color
00222 );
00223
00224 UINT8 v_CheckDepth (
00225 const UINT8 depth
00226 );
00227
00228 const TRANS2D_MAPGEN& v_GetTransformationInternalToModel (
00229 ) { return m_Transformation; };
00230
00231 #endif // GENERATING_DOXYGEN_OUTPUT
00232
00233 };
00234
00235 }
00236
00237 #endif
00238
00239
00240