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