Warning, file /include/opencascade/Graphic3d_TextureParams.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Graphic3d_TextureParams_HeaderFile
0015 #define _Graphic3d_TextureParams_HeaderFile
0016
0017 #include <Graphic3d_LevelOfTextureAnisotropy.hxx>
0018 #include <Graphic3d_Vec2.hxx>
0019 #include <Graphic3d_Vec4.hxx>
0020 #include <Graphic3d_TextureUnit.hxx>
0021 #include <Graphic3d_TypeOfTextureFilter.hxx>
0022 #include <Graphic3d_TypeOfTextureMode.hxx>
0023 #include <Standard.hxx>
0024 #include <Standard_ShortReal.hxx>
0025 #include <Standard_Type.hxx>
0026 #include <Standard_Transient.hxx>
0027
0028
0029 class Graphic3d_TextureParams : public Standard_Transient
0030 {
0031 DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureParams, Standard_Transient)
0032 public:
0033
0034
0035 Standard_EXPORT Graphic3d_TextureParams();
0036
0037
0038 Standard_EXPORT virtual ~Graphic3d_TextureParams();
0039
0040
0041 Graphic3d_TextureUnit TextureUnit() const { return myTextureUnit; }
0042
0043
0044 void SetTextureUnit (Graphic3d_TextureUnit theUnit) { myTextureUnit = theUnit; }
0045
0046
0047
0048 Standard_Boolean IsModulate() const { return myToModulate; }
0049
0050
0051 Standard_EXPORT void SetModulate (const Standard_Boolean theToModulate);
0052
0053
0054
0055 Standard_Boolean IsRepeat() const { return myToRepeat; }
0056
0057
0058 Standard_EXPORT void SetRepeat (const Standard_Boolean theToRepeat);
0059
0060
0061
0062 Graphic3d_TypeOfTextureFilter Filter() const { return myFilter; }
0063
0064
0065 Standard_EXPORT void SetFilter (const Graphic3d_TypeOfTextureFilter theFilter);
0066
0067
0068
0069 Graphic3d_LevelOfTextureAnisotropy AnisoFilter() const { return myAnisoLevel; }
0070
0071
0072 Standard_EXPORT void SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel);
0073
0074
0075
0076 Standard_ShortReal Rotation() const { return myRotAngle; }
0077
0078
0079 Standard_EXPORT void SetRotation (const Standard_ShortReal theAngleDegrees);
0080
0081
0082
0083 const Graphic3d_Vec2& Scale() const { return myScale; }
0084
0085
0086 Standard_EXPORT void SetScale (const Graphic3d_Vec2 theScale);
0087
0088
0089
0090 const Graphic3d_Vec2& Translation() const { return myTranslation; }
0091
0092
0093 Standard_EXPORT void SetTranslation (const Graphic3d_Vec2 theVec);
0094
0095
0096
0097 Graphic3d_TypeOfTextureMode GenMode() const { return myGenMode; }
0098
0099
0100 const Graphic3d_Vec4& GenPlaneS() const { return myGenPlaneS; }
0101
0102
0103 const Graphic3d_Vec4& GenPlaneT() const { return myGenPlaneT; }
0104
0105
0106 Standard_EXPORT void SetGenMode (const Graphic3d_TypeOfTextureMode theMode, const Graphic3d_Vec4 thePlaneS, const Graphic3d_Vec4 thePlaneT);
0107
0108
0109 Standard_Integer BaseLevel() const { return myBaseLevel; }
0110
0111
0112
0113 Standard_Integer MaxLevel() const { return myMaxLevel; }
0114
0115
0116
0117
0118 void SetLevelsRange (Standard_Integer theFirstLevel, Standard_Integer theSecondLevel = 0)
0119 {
0120 myMaxLevel = theFirstLevel > theSecondLevel ? theFirstLevel : theSecondLevel;
0121 myBaseLevel = theFirstLevel > theSecondLevel ? theSecondLevel : theFirstLevel;
0122 }
0123
0124
0125 unsigned int SamplerRevision() const { return mySamplerRevision; }
0126
0127 private:
0128
0129
0130 void updateSamplerRevision() { ++mySamplerRevision; }
0131
0132 private:
0133
0134 Graphic3d_Vec4 myGenPlaneS;
0135 Graphic3d_Vec4 myGenPlaneT;
0136 Graphic3d_Vec2 myScale;
0137 Graphic3d_Vec2 myTranslation;
0138 unsigned int mySamplerRevision;
0139 Graphic3d_TextureUnit myTextureUnit;
0140 Graphic3d_TypeOfTextureFilter myFilter;
0141 Graphic3d_LevelOfTextureAnisotropy myAnisoLevel;
0142 Graphic3d_TypeOfTextureMode myGenMode;
0143 Standard_Integer myBaseLevel;
0144 Standard_Integer myMaxLevel;
0145 Standard_ShortReal myRotAngle;
0146 Standard_Boolean myToModulate;
0147 Standard_Boolean myToRepeat;
0148
0149 };
0150
0151 DEFINE_STANDARD_HANDLE(Graphic3d_TextureParams, Standard_Transient)
0152
0153 #endif