Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:49

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 applyable on polygons.
0026 class Graphic3d_TextureMap : public Graphic3d_TextureRoot
0027 {
0028   DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot)
0029 public:
0030 
0031   //! enable texture smoothing
0032   Standard_EXPORT void EnableSmooth();
0033 
0034   //! Returns TRUE if the texture is smoothed.
0035   Standard_EXPORT Standard_Boolean IsSmoothed() const;
0036 
0037   //! disable texture smoothing
0038   Standard_EXPORT void DisableSmooth();
0039   
0040     //! enable texture modulate mode.
0041   //! the image is modulate with the shading of the surface.
0042   Standard_EXPORT void EnableModulate();
0043 
0044   //! disable texture modulate mode.
0045   //! the image is directly decal on the surface.
0046   Standard_EXPORT void DisableModulate();
0047 
0048   //! Returns TRUE if the texture is modulate.
0049   Standard_EXPORT Standard_Boolean IsModulate() const;
0050 
0051   //! use this methods if you want to enable
0052   //! texture repetition on your objects.
0053   Standard_EXPORT void EnableRepeat();
0054 
0055   //! use this methods if you want to disable
0056   //! texture repetition on your objects.
0057   Standard_EXPORT void DisableRepeat();
0058 
0059   //! Returns TRUE if the texture repeat is enable.
0060   Standard_EXPORT Standard_Boolean IsRepeat() const;
0061 
0062   //! @return level of anisotropy texture filter.
0063   //! Default value is Graphic3d_LOTA_OFF.
0064   Standard_EXPORT Graphic3d_LevelOfTextureAnisotropy AnisoFilter() const;
0065 
0066   //! @param theLevel level of anisotropy texture filter.
0067   Standard_EXPORT void SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel);
0068 
0069 protected:
0070 
0071   Standard_EXPORT Graphic3d_TextureMap(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType);
0072   
0073   Standard_EXPORT Graphic3d_TextureMap(const Handle(Image_PixMap)& thePixMap, const Graphic3d_TypeOfTexture theType);
0074 
0075 };
0076 
0077 DEFINE_STANDARD_HANDLE(Graphic3d_TextureMap, Graphic3d_TextureRoot)
0078 
0079 #endif // _Graphic3d_TextureMap_HeaderFile