summaryrefslogtreecommitdiff
path: root/src/Graphic3d/Graphic3d_TextureMap.cxx
blob: 61068830983c2221e65e75424fefcbe76165e860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// File:	Graphic3d_TextureMap.cxx
// Created:	Mon Jul 28 17:49:46 1997
// Author:	Pierre CHALAMET
//		<fmn@sgi93>
// Modified : 	GG 09/11/00 smooth,modulate,repeat texture attributes
//		must be available both for textures 1D & 2D.


#include <Graphic3d_TextureMap.ixx>

Graphic3d_TextureMap::Graphic3d_TextureMap(const Handle(Graphic3d_StructureManager)& SM,const Standard_CString Path,const Standard_CString FileName,const Graphic3d_TypeOfTexture Type)
: Graphic3d_TextureRoot(SM, Path, FileName, Type)
{
}

void Graphic3d_TextureMap::EnableSmooth() {
  MyCInitTexture.doLinear = 1;
  Update();
}

void Graphic3d_TextureMap::DisableSmooth() {
  MyCInitTexture.doLinear = 0;
  Update();
}

Standard_Boolean Graphic3d_TextureMap::IsSmoothed() const {
  return (MyCInitTexture.doLinear != 0);
}

void Graphic3d_TextureMap::EnableModulate() {
  MyCInitTexture.doModulate = 1;
  Update();
}

void Graphic3d_TextureMap::DisableModulate() {
  MyCInitTexture.doModulate = 0;
  Update();
}

Standard_Boolean Graphic3d_TextureMap::IsModulate() const {
  return (MyCInitTexture.doModulate != 0);
}

void Graphic3d_TextureMap::EnableRepeat() {
  MyCInitTexture.doRepeat = 1;
  Update();
}

void Graphic3d_TextureMap::DisableRepeat() {
  MyCInitTexture.doRepeat = 0;
  Update();
}

Standard_Boolean Graphic3d_TextureMap::IsRepeat() const {
  return (MyCInitTexture.doRepeat != 0);
}