Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:03:27

0001 // Created on: 1997-07-28
0002 // Created by: Pierre CHALAMET
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Graphic3d_TextureMap_HeaderFile
0018 #define _Graphic3d_TextureMap_HeaderFile
0019 
0020 #include <Graphic3d_TextureRoot.hxx>
0021 #include <Graphic3d_TypeOfTexture.hxx>
0022 #include <Graphic3d_LevelOfTextureAnisotropy.hxx>
0023 class TCollection_AsciiString;
0024 
0025 //! This is an abstract class for managing texture applicable on polygons.
0026 class Graphic3d_TextureMap : public Graphic3d_TextureRoot
0027 {
0028   DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot)
0029 public:
0030   //! enable texture smoothing
0031   Standard_EXPORT void EnableSmooth();
0032 
0033   //! Returns TRUE if the texture is smoothed.
0034   Standard_EXPORT bool IsSmoothed() const;
0035 
0036   //! disable texture smoothing
0037   Standard_EXPORT void DisableSmooth();
0038 
0039   //! enable texture modulate mode.
0040   //! the image is modulate with the shading of the surface.
0041   Standard_EXPORT void EnableModulate();
0042 
0043   //! disable texture modulate mode.
0044   //! the image is directly decal on the surface.
0045   Standard_EXPORT void DisableModulate();
0046 
0047   //! Returns TRUE if the texture is modulate.
0048   Standard_EXPORT bool IsModulate() const;
0049 
0050   //! use this methods if you want to enable
0051   //! texture repetition on your objects.
0052   Standard_EXPORT void EnableRepeat();
0053 
0054   //! use this methods if you want to disable
0055   //! texture repetition on your objects.
0056   Standard_EXPORT void DisableRepeat();
0057 
0058   //! Returns TRUE if the texture repeat is enable.
0059   Standard_EXPORT bool IsRepeat() const;
0060 
0061   //! @return level of anisotropy texture filter.
0062   //! Default value is Graphic3d_LOTA_OFF.
0063   Standard_EXPORT Graphic3d_LevelOfTextureAnisotropy AnisoFilter() const;
0064 
0065   //! @param theLevel level of anisotropy texture filter.
0066   Standard_EXPORT void SetAnisoFilter(const Graphic3d_LevelOfTextureAnisotropy theLevel);
0067 
0068 protected:
0069   Standard_EXPORT Graphic3d_TextureMap(const TCollection_AsciiString& theFileName,
0070                                        const Graphic3d_TypeOfTexture  theType);
0071 
0072   Standard_EXPORT Graphic3d_TextureMap(const occ::handle<Image_PixMap>& thePixMap,
0073                                        const Graphic3d_TypeOfTexture    theType);
0074 };
0075 
0076 #endif // _Graphic3d_TextureMap_HeaderFile