Test for 0022778: Bug in BRepMesh
[occt.git] / src / Graphic3d / Graphic3d_TextureMap.cxx
CommitLineData
b311480e 1// Created on: 1997-07-28
2// Created by: Pierre CHALAMET
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21#include <Graphic3d_TextureMap.ixx>
bf75be98 22#include <Graphic3d_TextureParams.hxx>
23
24// =======================================================================
25// function : Graphic3d_TextureMap
26// purpose :
27// =======================================================================
28Graphic3d_TextureMap::Graphic3d_TextureMap (const TCollection_AsciiString& theFileName,
29 const Graphic3d_TypeOfTexture theType)
30: Graphic3d_TextureRoot (theFileName, theType)
31{
32}
7fd59977 33
bf75be98 34// =======================================================================
35// function : EnableSmooth
36// purpose :
37// =======================================================================
38void Graphic3d_TextureMap::EnableSmooth()
7fd59977 39{
bf75be98 40 myParams->SetFilter (Graphic3d_TOTF_TRILINEAR);
7fd59977 41}
42
bf75be98 43// =======================================================================
44// function : DisableSmooth
45// purpose :
46// =======================================================================
47void Graphic3d_TextureMap::DisableSmooth()
48{
49 myParams->SetFilter (Graphic3d_TOTF_NEAREST);
7fd59977 50}
51
bf75be98 52// =======================================================================
53// function : IsSmoothed
54// purpose :
55// =======================================================================
56Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const
57{
58 return myParams->Filter() != Graphic3d_TOTF_NEAREST;
7fd59977 59}
60
bf75be98 61// =======================================================================
62// function : EnableModulate
63// purpose :
64// =======================================================================
65void Graphic3d_TextureMap::EnableModulate()
66{
67 myParams->SetModulate (Standard_True);
7fd59977 68}
69
bf75be98 70// =======================================================================
71// function : DisableModulate
72// purpose :
73// =======================================================================
74void Graphic3d_TextureMap::DisableModulate()
75{
76 myParams->SetModulate (Standard_False);
7fd59977 77}
78
bf75be98 79// =======================================================================
80// function : IsModulate
81// purpose :
82// =======================================================================
83Standard_Boolean Graphic3d_TextureMap::IsModulate() const
84{
85 return myParams->IsModulate();
7fd59977 86}
87
bf75be98 88// =======================================================================
89// function : EnableRepeat
90// purpose :
91// =======================================================================
92void Graphic3d_TextureMap::EnableRepeat()
93{
94 myParams->SetRepeat (Standard_True);
7fd59977 95}
96
bf75be98 97// =======================================================================
98// function : DisableRepeat
99// purpose :
100// =======================================================================
101void Graphic3d_TextureMap::DisableRepeat()
102{
103 myParams->SetRepeat (Standard_False);
7fd59977 104}
105
bf75be98 106// =======================================================================
107// function : IsRepeat
108// purpose :
109// =======================================================================
110Standard_Boolean Graphic3d_TextureMap::IsRepeat() const
111{
112 return myParams->IsRepeat();
7fd59977 113}
114
bf75be98 115// =======================================================================
116// function : AnisoFilter
117// purpose :
118// =======================================================================
119Graphic3d_LevelOfTextureAnisotropy Graphic3d_TextureMap::AnisoFilter() const
120{
121 return myParams->AnisoFilter();
7fd59977 122}
123
bf75be98 124// =======================================================================
125// function : SetAnisoFilter
126// purpose :
127// =======================================================================
128void Graphic3d_TextureMap::SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel)
129{
130 myParams->SetAnisoFilter (theLevel);
131}