00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _TEXTVRE2D_H
00013 #define _TEXTVRE2D_H
00014
00015 #include "Template.h"
00016
00017
00021 class XSIEXPORT CSLTexture2D
00022 : public CSLTemplate
00023 {
00024 public:
00028 enum EMappingType
00029 {
00030 SI_XY_PROJECTION,
00031 SI_XZ_PROJECTION,
00032 SI_YZ_PROJECTION,
00033 SI_UV_MAP,
00034 SI_UV_MAP_WRAPPED,
00035 SI_CYLINDRICAL_PROJECTION,
00036 SI_SPHERICAL_PROJECTION,
00037 SI_REFLECTION_MAP,
00038 };
00039
00043 enum EBlendingType
00044 {
00045 SI_ALPHA_MASK,
00046 SI_INTENSITY_MASK,
00047 SI_NO_MASK,
00048 SI_RGB_MODULATION,
00049 };
00050
00051 CSLTexture2D(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00052 virtual ~CSLTexture2D();
00053
00057 SI_Char* GetImageFileName() { return m_ImageName; }
00058
00063 SI_Void SetImageFileName(SI_Char* in_szValue) { m_ImageName = in_szValue; }
00064
00068 EMappingType GetMappingType() { return m_MappingType; }
00069
00074 SI_Void SetMappingType(EMappingType in_Type) { m_MappingType = in_Type; }
00075
00079 SI_Int GetImageWidth() { return m_Width; }
00080
00085 SI_Void SetImageWidth(SI_Int in_nValue) { m_Width = in_nValue; }
00086
00090 SI_Int GetImageHeight() { return m_Height; }
00091
00096 SI_Void SetImageHeight(SI_Int in_nValue) { m_Height = in_nValue; }
00097
00101 SI_Int GetCropUMin() { return m_CropUMin; }
00102
00107 SI_Void SetCropUMin(SI_Int in_nValue) { m_CropUMin = in_nValue; }
00108
00112 SI_Int GetCropUMax() { return m_CropUMax; }
00113
00118 SI_Void SetCropUMax(SI_Int in_nValue) { m_CropUMax = in_nValue; }
00119
00123 SI_Int GetCropVMin() { return m_CropVMin; }
00124
00129 SI_Void SetCropVMin(SI_Int in_nValue) { m_CropVMin = in_nValue; }
00130
00134 SI_Int GetCropVMax() { return m_CropVMax; }
00135
00140 SI_Void SetCropVMax(SI_Int in_nValue) { m_CropVMax = in_nValue; }
00141
00145 SI_Bool GetUVSwapFlag() { return m_UVSwap; }
00146
00151 SI_Void SetUVSwapFlag(SI_Bool in_bState) { m_UVSwap = in_bState; }
00152
00156 SI_Int GetURepeat() { return m_URepeat; }
00157
00162 SI_Void SetURepeat(SI_Int in_nValue) { m_URepeat = in_nValue; }
00163
00167 SI_Int GetVRepeat() { return m_VRepeat; }
00168
00173 SI_Void SetVRepeat(SI_Int in_nValue) { m_VRepeat = in_nValue; }
00174
00178 SI_Bool GetUAlternate() { return m_UAlternate; }
00179
00184 SI_Void SetUAlternate(SI_Bool in_bState) { m_UAlternate = in_bState; }
00185
00189 SI_Bool GetVAlternate() { return m_VAlternate; }
00190
00195 SI_Void SetVAlternate(SI_Bool in_bState) { m_VAlternate = in_bState; }
00196
00200 SI_Float GetUScale() { return m_UScale; }
00201
00206 SI_Void SetUScale(SI_Float in_fValue) { m_UScale = in_fValue; }
00207
00211 SI_Float GetVScale() { return m_VScale; }
00212
00217 SI_Void SetVScale(SI_Float in_fValue) { m_VScale = in_fValue; }
00218
00222 SI_Float GetUOffset() { return m_UOffset; }
00223
00228 SI_Void SetUOffset(SI_Float in_fValue) { m_UOffset = in_fValue; }
00229
00233 SI_Float GetVOffset() { return m_VOffset; }
00234
00239 SI_Void SetVOffset(SI_Float in_fValue) { m_VOffset = in_fValue; }
00240
00244 CSIBCMatrix4x4 GetProjectionMatrix() { return m_ProjectionMatrix; }
00245
00250 SI_Void SetProjectionMatrix(CSIBCMatrix4x4& in_Value) { m_ProjectionMatrix = in_Value; }
00251
00255 EBlendingType GetBlendingType() { return m_BlendingType; }
00256
00261 SI_Void SetBlendingType(EBlendingType in_Type) { m_BlendingType = in_Type; }
00262
00266 SI_Float GetBlending() { return m_Blending; }
00267
00272 SI_Void SetBlending(SI_Float in_fValue) { m_Blending = in_fValue; }
00273
00277 SI_Float GetAmbient() { return m_Ambient; }
00278
00283 SI_Void SetAmbient(SI_Float in_fValue) { m_Ambient = in_fValue; }
00284
00288 SI_Float GetDiffuse() { return m_Diffuse; }
00289
00294 SI_Void SetDiffuse(SI_Float in_fValue) { m_Diffuse = in_fValue; }
00295
00299 SI_Float GetSpecular() { return m_Specular; }
00300
00305 SI_Void SetSpecular(SI_Float in_fValue) { m_Specular = in_fValue; }
00306
00310 SI_Float GetTransparency() { return m_Transparency; }
00311
00316 SI_Void SetTransparency(SI_Float in_fValue) { m_Transparency = in_fValue; }
00317
00321 SI_Float GetReflectivity() { return m_Reflectivity; }
00322
00327 SI_Void SetReflectivity(SI_Float in_fValue) { m_Reflectivity = in_fValue; }
00328
00332 SI_Float GetRoughness() { return m_Roughness; }
00333
00338 SI_Void SetRoughness(SI_Float in_fValue) { m_Roughness = in_fValue; }
00339
00340 virtual ETemplateType Type() { return SI_TEXTURE_2D; }
00341
00342 private:
00343 CSLStringProxy m_ImageName;
00344 CSLEnumProxy<EMappingType, SI_REFLECTION_MAP> m_MappingType;
00345 CSLIntProxy m_Width;
00346 CSLIntProxy m_Height;
00347 CSLIntProxy m_CropUMin;
00348 CSLIntProxy m_CropUMax;
00349 CSLIntProxy m_CropVMin;
00350 CSLIntProxy m_CropVMax;
00351 CSLBoolProxy m_UVSwap;
00352 CSLIntProxy m_URepeat;
00353 CSLIntProxy m_VRepeat;
00354 CSLBoolProxy m_UAlternate;
00355 CSLBoolProxy m_VAlternate;
00356 CSLFloatProxy m_UScale;
00357 CSLFloatProxy m_VScale;
00358 CSLFloatProxy m_UOffset;
00359 CSLFloatProxy m_VOffset;
00360 CSLMatrix4x4Proxy m_ProjectionMatrix;
00361 CSLEnumProxy<EBlendingType, SI_RGB_MODULATION> m_BlendingType;
00362 CSLFloatProxy m_Blending;
00363 CSLFloatProxy m_Ambient;
00364 CSLFloatProxy m_Diffuse;
00365 CSLFloatProxy m_Specular;
00366 CSLFloatProxy m_Transparency;
00367 CSLFloatProxy m_Reflectivity;
00368 CSLFloatProxy m_Roughness;
00369
00370 void *m_pReserved;
00371 };
00372
00373 #endif