00001
00002
00012
00013
00014 #ifndef _TEXTVRE2D_H
00015 #define _TEXTVRE2D_H
00016
00017 #include "Template.h"
00018
00019
00025 class XSIEXPORT CSLTexture2D
00026 : public CSLTemplate
00027 {
00028 public:
00031 enum EMappingType
00032 {
00033 SI_XY_PROJECTION,
00034 SI_XZ_PROJECTION,
00035 SI_YZ_PROJECTION,
00036 SI_UV_MAP,
00037 SI_UV_MAP_WRAPPED,
00038 SI_CYLINDRICAL_PROJECTION,
00039 SI_SPHERICAL_PROJECTION,
00040 SI_REFLECTION_MAP,
00041 };
00042
00045 enum EBlendingType
00046 {
00047 SI_ALPHA_MASK,
00048 SI_INTENSITY_MASK,
00049 SI_NO_MASK,
00050 SI_RGB_MODULATION,
00051 };
00052
00053 CSLTexture2D(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00054 virtual ~CSLTexture2D();
00055
00059 SI_Char* GetImageFileName() { return m_ImageName; }
00060
00064 SI_Void SetImageFileName(SI_Char* in_szValue) { m_ImageName = in_szValue; }
00065
00069 EMappingType GetMappingType() { return m_MappingType; }
00070
00074 SI_Void SetMappingType(EMappingType in_Type) { m_MappingType = in_Type; }
00075
00079 SI_Int GetImageWidth() { return m_Width; }
00080
00084 SI_Void SetImageWidth(SI_Int in_nValue) { m_Width = in_nValue; }
00085
00089 SI_Int GetImageHeight() { return m_Height; }
00090
00094 SI_Void SetImageHeight(SI_Int in_nValue) { m_Height = in_nValue; }
00095
00099 SI_Int GetCropUMin() { return m_CropUMin; }
00100
00104 SI_Void SetCropUMin(SI_Int in_nValue) { m_CropUMin = in_nValue; }
00105
00109 SI_Int GetCropUMax() { return m_CropUMax; }
00110
00114 SI_Void SetCropUMax(SI_Int in_nValue) { m_CropUMax = in_nValue; }
00115
00119 SI_Int GetCropVMin() { return m_CropVMin; }
00120
00124 SI_Void SetCropVMin(SI_Int in_nValue) { m_CropVMin = in_nValue; }
00125
00129 SI_Int GetCropVMax() { return m_CropVMax; }
00130
00134 SI_Void SetCropVMax(SI_Int in_nValue) { m_CropVMax = in_nValue; }
00135
00139 SI_Bool GetUVSwapFlag() { return m_UVSwap; }
00140
00144 SI_Void SetUVSwapFlag(SI_Bool in_bState) { m_UVSwap = in_bState; }
00145
00149 SI_Int GetURepeat() { return m_URepeat; }
00150
00154 SI_Void SetURepeat(SI_Int in_nValue) { m_URepeat = in_nValue; }
00155
00159 SI_Int GetVRepeat() { return m_VRepeat; }
00160
00164 SI_Void SetVRepeat(SI_Int in_nValue) { m_VRepeat = in_nValue; }
00165
00169 SI_Bool GetUAlternate() { return m_UAlternate; }
00170
00174 SI_Void SetUAlternate(SI_Bool in_bState) { m_UAlternate = in_bState; }
00175
00179 SI_Bool GetVAlternate() { return m_VAlternate; }
00180
00184 SI_Void SetVAlternate(SI_Bool in_bState) { m_VAlternate = in_bState; }
00185
00189 SI_Float GetUScale() { return m_UScale; }
00190
00194 SI_Void SetUScale(SI_Float in_fValue) { m_UScale = in_fValue; }
00195
00199 SI_Float GetVScale() { return m_VScale; }
00200
00204 SI_Void SetVScale(SI_Float in_fValue) { m_VScale = in_fValue; }
00205
00209 SI_Float GetUOffset() { return m_UOffset; }
00210
00214 SI_Void SetUOffset(SI_Float in_fValue) { m_UOffset = in_fValue; }
00215
00219 SI_Float GetVOffset() { return m_VOffset; }
00220
00224 SI_Void SetVOffset(SI_Float in_fValue) { m_VOffset = in_fValue; }
00225
00229 CSIBCMatrix4x4 GetProjectionMatrix() { return m_ProjectionMatrix; }
00230
00234 SI_Void SetProjectionMatrix(CSIBCMatrix4x4& in_Value) { m_ProjectionMatrix = in_Value; }
00235
00239 EBlendingType GetBlendingType() { return m_BlendingType; }
00240
00244 SI_Void SetBlendingType(EBlendingType in_Type) { m_BlendingType = in_Type; }
00245
00249 SI_Float GetBlending() { return m_Blending; }
00250
00254 SI_Void SetBlending(SI_Float in_fValue) { m_Blending = in_fValue; }
00255
00259 SI_Float GetAmbient() { return m_Ambient; }
00260
00264 SI_Void SetAmbient(SI_Float in_fValue) { m_Ambient = in_fValue; }
00265
00269 SI_Float GetDiffuse() { return m_Diffuse; }
00270
00274 SI_Void SetDiffuse(SI_Float in_fValue) { m_Diffuse = in_fValue; }
00275
00279 SI_Float GetSpecular() { return m_Specular; }
00280
00284 SI_Void SetSpecular(SI_Float in_fValue) { m_Specular = in_fValue; }
00285
00289 SI_Float GetTransparency() { return m_Transparency; }
00290
00294 SI_Void SetTransparency(SI_Float in_fValue) { m_Transparency = in_fValue; }
00295
00299 SI_Float GetReflectivity() { return m_Reflectivity; }
00300
00304 SI_Void SetReflectivity(SI_Float in_fValue) { m_Reflectivity = in_fValue; }
00305
00309 SI_Float GetRoughness() { return m_Roughness; }
00310
00314 SI_Void SetRoughness(SI_Float in_fValue) { m_Roughness = in_fValue; }
00315
00319 virtual ETemplateType Type() { return SI_TEXTURE_2D; }
00320
00321 private:
00322 CSLStringProxy m_ImageName;
00323 CSLEnumProxy<EMappingType, SI_REFLECTION_MAP> m_MappingType;
00324 CSLIntProxy m_Width;
00325 CSLIntProxy m_Height;
00326 CSLIntProxy m_CropUMin;
00327 CSLIntProxy m_CropUMax;
00328 CSLIntProxy m_CropVMin;
00329 CSLIntProxy m_CropVMax;
00330 CSLBoolProxy m_UVSwap;
00331 CSLIntProxy m_URepeat;
00332 CSLIntProxy m_VRepeat;
00333 CSLBoolProxy m_UAlternate;
00334 CSLBoolProxy m_VAlternate;
00335 CSLFloatProxy m_UScale;
00336 CSLFloatProxy m_VScale;
00337 CSLFloatProxy m_UOffset;
00338 CSLFloatProxy m_VOffset;
00339 CSLMatrix4x4Proxy m_ProjectionMatrix;
00340 CSLEnumProxy<EBlendingType, SI_RGB_MODULATION> m_BlendingType;
00341 CSLFloatProxy m_Blending;
00342 CSLFloatProxy m_Ambient;
00343 CSLFloatProxy m_Diffuse;
00344 CSLFloatProxy m_Specular;
00345 CSLFloatProxy m_Transparency;
00346 CSLFloatProxy m_Reflectivity;
00347 CSLFloatProxy m_Roughness;
00348
00349 void *m_pReserved;
00350 };
00351
00352 #endif