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 #ifndef _Graphic3d_TextureMap_HeaderFile
18 #define _Graphic3d_TextureMap_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Graphic3d_TextureRoot.hxx>
24 #include <Graphic3d_TypeOfTexture.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Graphic3d_LevelOfTextureAnisotropy.hxx>
27 class TCollection_AsciiString;
30 class Graphic3d_TextureMap;
31 DEFINE_STANDARD_HANDLE(Graphic3d_TextureMap, Graphic3d_TextureRoot)
33 //! This is an abstract class for managing texture applyable on polygons.
34 class Graphic3d_TextureMap : public Graphic3d_TextureRoot
41 //! enable texture smoothing
42 Standard_EXPORT void EnableSmooth();
45 //! Returns TRUE if the texture is smoothed.
46 Standard_EXPORT Standard_Boolean IsSmoothed() const;
49 //! disable texture smoothing
50 Standard_EXPORT void DisableSmooth();
53 //! enable texture modulate mode.
54 //! the image is modulate with the shading of the surface.
55 Standard_EXPORT void EnableModulate();
58 //! disable texture modulate mode.
59 //! the image is directly decal on the surface.
60 Standard_EXPORT void DisableModulate();
63 //! Returns TRUE if the texture is modulate.
64 Standard_EXPORT Standard_Boolean IsModulate() const;
67 //! use this methods if you want to enable
68 //! texture repetition on your objects.
69 Standard_EXPORT void EnableRepeat();
72 //! use this methods if you want to disable
73 //! texture repetition on your objects.
74 Standard_EXPORT void DisableRepeat();
77 //! Returns TRUE if the texture repeat is enable.
78 Standard_EXPORT Standard_Boolean IsRepeat() const;
80 //! @return level of anisontropy texture filter.
81 //! Default value is Graphic3d_LOTA_OFF.
82 Standard_EXPORT Graphic3d_LevelOfTextureAnisotropy AnisoFilter() const;
84 //! @param theLevel level of anisontropy texture filter.
85 Standard_EXPORT void SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel);
90 DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureMap,Graphic3d_TextureRoot)
95 Standard_EXPORT Graphic3d_TextureMap(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType);
97 Standard_EXPORT Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType);
114 #endif // _Graphic3d_TextureMap_HeaderFile