1 // Created on: 1997-07-28
2 // Created by: Pierre CHALAMET
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <Graphic3d_TextureMap.ixx>
18 #include <Graphic3d_TextureParams.hxx>
20 // =======================================================================
21 // function : Graphic3d_TextureMap
23 // =======================================================================
24 Graphic3d_TextureMap::Graphic3d_TextureMap (const TCollection_AsciiString& theFileName,
25 const Graphic3d_TypeOfTexture theType)
26 : Graphic3d_TextureRoot (theFileName, theType)
30 // =======================================================================
31 // function : EnableSmooth
33 // =======================================================================
34 void Graphic3d_TextureMap::EnableSmooth()
36 myParams->SetFilter (Graphic3d_TOTF_TRILINEAR);
39 // =======================================================================
40 // function : DisableSmooth
42 // =======================================================================
43 void Graphic3d_TextureMap::DisableSmooth()
45 myParams->SetFilter (Graphic3d_TOTF_NEAREST);
48 // =======================================================================
49 // function : IsSmoothed
51 // =======================================================================
52 Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const
54 return myParams->Filter() != Graphic3d_TOTF_NEAREST;
57 // =======================================================================
58 // function : EnableModulate
60 // =======================================================================
61 void Graphic3d_TextureMap::EnableModulate()
63 myParams->SetModulate (Standard_True);
66 // =======================================================================
67 // function : DisableModulate
69 // =======================================================================
70 void Graphic3d_TextureMap::DisableModulate()
72 myParams->SetModulate (Standard_False);
75 // =======================================================================
76 // function : IsModulate
78 // =======================================================================
79 Standard_Boolean Graphic3d_TextureMap::IsModulate() const
81 return myParams->IsModulate();
84 // =======================================================================
85 // function : EnableRepeat
87 // =======================================================================
88 void Graphic3d_TextureMap::EnableRepeat()
90 myParams->SetRepeat (Standard_True);
93 // =======================================================================
94 // function : DisableRepeat
96 // =======================================================================
97 void Graphic3d_TextureMap::DisableRepeat()
99 myParams->SetRepeat (Standard_False);
102 // =======================================================================
103 // function : IsRepeat
105 // =======================================================================
106 Standard_Boolean Graphic3d_TextureMap::IsRepeat() const
108 return myParams->IsRepeat();
111 // =======================================================================
112 // function : AnisoFilter
114 // =======================================================================
115 Graphic3d_LevelOfTextureAnisotropy Graphic3d_TextureMap::AnisoFilter() const
117 return myParams->AnisoFilter();
120 // =======================================================================
121 // function : SetAnisoFilter
123 // =======================================================================
124 void Graphic3d_TextureMap::SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel)
126 myParams->SetAnisoFilter (theLevel);