00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _TEXTVRE2D_H
00023 #define _TEXTVRE2D_H
00024
00025 #include "Template.h"
00026
00027
00031 class XSIEXPORT CSLTexture2D
00032 : public CSLTemplate
00033 {
00034 public:
00038 enum EMappingType
00039 {
00040 SI_XY_PROJECTION,
00041 SI_XZ_PROJECTION,
00042 SI_YZ_PROJECTION,
00043 SI_UV_MAP,
00044 SI_UV_MAP_WRAPPED,
00045 SI_CYLINDRICAL_PROJECTION,
00046 SI_SPHERICAL_PROJECTION,
00047 SI_REFLECTION_MAP,
00048 };
00049
00053 enum EBlendingType
00054 {
00055 SI_ALPHA_MASK,
00056 SI_INTENSITY_MASK,
00057 SI_NO_MASK,
00058 SI_RGB_MODULATION,
00059 };
00060
00061 CSLTexture2D(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00062 virtual ~CSLTexture2D();
00063
00067 SI_Char* GetImageFileName() { return m_ImageName; }
00068
00073 SI_Void SetImageFileName(SI_Char* in_szValue) { m_ImageName = in_szValue; }
00074
00078 EMappingType GetMappingType() { return m_MappingType; }
00079
00084 SI_Void SetMappingType(EMappingType in_Type) { m_MappingType = in_Type; }
00085
00089 SI_Int GetImageWidth() { return m_Width; }
00090
00095 SI_Void SetImageWidth(SI_Int in_nValue) { m_Width = in_nValue; }
00096
00100 SI_Int GetImageHeight() { return m_Height; }
00101
00106 SI_Void SetImageHeight(SI_Int in_nValue) { m_Height = in_nValue; }
00107
00111 SI_Int GetCropUMin() { return m_CropUMin; }
00112
00117 SI_Void SetCropUMin(SI_Int in_nValue) { m_CropUMin = in_nValue; }
00118
00122 SI_Int GetCropUMax() { return m_CropUMax; }
00123
00128 SI_Void SetCropUMax(SI_Int in_nValue) { m_CropUMax = in_nValue; }
00129
00133 SI_Int GetCropVMin() { return m_CropVMin; }
00134
00139 SI_Void SetCropVMin(SI_Int in_nValue) { m_CropVMin = in_nValue; }
00140
00144 SI_Int GetCropVMax() { return m_CropVMax; }
00145
00150 SI_Void SetCropVMax(SI_Int in_nValue) { m_CropVMax = in_nValue; }
00151
00155 SI_Bool GetUVSwapFlag() { return m_UVSwap; }
00156
00161 SI_Void SetUVSwapFlag(SI_Bool in_bState) { m_UVSwap = in_bState; }
00162
00166 SI_Int GetURepeat() { return m_URepeat; }
00167
00172 SI_Void SetURepeat(SI_Int in_nValue) { m_URepeat = in_nValue; }
00173
00177 SI_Int GetVRepeat() { return m_VRepeat; }
00178
00183 SI_Void SetVRepeat(SI_Int in_nValue) { m_VRepeat = in_nValue; }
00184
00188 SI_Bool GetUAlternate() { return m_UAlternate; }
00189
00194 SI_Void SetUAlternate(SI_Bool in_bState) { m_UAlternate = in_bState; }
00195
00199 SI_Bool GetVAlternate() { return m_VAlternate; }
00200
00205 SI_Void SetVAlternate(SI_Bool in_bState) { m_VAlternate = in_bState; }
00206
00210 SI_Float GetUScale() { return m_UScale; }
00211
00216 SI_Void SetUScale(SI_Float in_fValue) { m_UScale = in_fValue; }
00217
00221 SI_Float GetVScale() { return m_VScale; }
00222
00227 SI_Void SetVScale(SI_Float in_fValue) { m_VScale = in_fValue; }
00228
00232 SI_Float GetUOffset() { return m_UOffset; }
00233
00238 SI_Void SetUOffset(SI_Float in_fValue) { m_UOffset = in_fValue; }
00239
00243 SI_Float GetVOffset() { return m_VOffset; }
00244
00249 SI_Void SetVOffset(SI_Float in_fValue) { m_VOffset = in_fValue; }
00250
00254 CSIBCMatrix4x4 GetProjectionMatrix() { return m_ProjectionMatrix; }
00255
00260 SI_Void SetProjectionMatrix(CSIBCMatrix4x4& in_Value) { m_ProjectionMatrix = in_Value; }
00261
00265 EBlendingType GetBlendingType() { return m_BlendingType; }
00266
00271 SI_Void SetBlendingType(EBlendingType in_Type) { m_BlendingType = in_Type; }
00272
00276 SI_Float GetBlending() { return m_Blending; }
00277
00282 SI_Void SetBlending(SI_Float in_fValue) { m_Blending = in_fValue; }
00283
00287 SI_Float GetAmbient() { return m_Ambient; }
00288
00293 SI_Void SetAmbient(SI_Float in_fValue) { m_Ambient = in_fValue; }
00294
00298 SI_Float GetDiffuse() { return m_Diffuse; }
00299
00304 SI_Void SetDiffuse(SI_Float in_fValue) { m_Diffuse = in_fValue; }
00305
00309 SI_Float GetSpecular() { return m_Specular; }
00310
00315 SI_Void SetSpecular(SI_Float in_fValue) { m_Specular = in_fValue; }
00316
00320 SI_Float GetTransparency() { return m_Transparency; }
00321
00326 SI_Void SetTransparency(SI_Float in_fValue) { m_Transparency = in_fValue; }
00327
00331 SI_Float GetReflectivity() { return m_Reflectivity; }
00332
00337 SI_Void SetReflectivity(SI_Float in_fValue) { m_Reflectivity = in_fValue; }
00338
00342 SI_Float GetRoughness() { return m_Roughness; }
00343
00348 SI_Void SetRoughness(SI_Float in_fValue) { m_Roughness = in_fValue; }
00349
00350 virtual ETemplateType Type() { return SI_TEXTURE_2D; }
00351
00352 private:
00353 CSLStringProxy m_ImageName;
00354 CSLEnumProxy<EMappingType, SI_REFLECTION_MAP> m_MappingType;
00355 CSLIntProxy m_Width;
00356 CSLIntProxy m_Height;
00357 CSLIntProxy m_CropUMin;
00358 CSLIntProxy m_CropUMax;
00359 CSLIntProxy m_CropVMin;
00360 CSLIntProxy m_CropVMax;
00361 CSLBoolProxy m_UVSwap;
00362 CSLIntProxy m_URepeat;
00363 CSLIntProxy m_VRepeat;
00364 CSLBoolProxy m_UAlternate;
00365 CSLBoolProxy m_VAlternate;
00366 CSLFloatProxy m_UScale;
00367 CSLFloatProxy m_VScale;
00368 CSLFloatProxy m_UOffset;
00369 CSLFloatProxy m_VOffset;
00370 CSLMatrix4x4Proxy m_ProjectionMatrix;
00371 CSLEnumProxy<EBlendingType, SI_RGB_MODULATION> m_BlendingType;
00372 CSLFloatProxy m_Blending;
00373 CSLFloatProxy m_Ambient;
00374 CSLFloatProxy m_Diffuse;
00375 CSLFloatProxy m_Specular;
00376 CSLFloatProxy m_Transparency;
00377 CSLFloatProxy m_Reflectivity;
00378 CSLFloatProxy m_Roughness;
00379
00380 void *m_pReserved;
00381 };
00382
00383 #endif