Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:17:29

0001 // Copyright (c) 2022 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Graphic3d_Texture3D_HeaderFile
0015 #define _Graphic3d_Texture3D_HeaderFile
0016 
0017 #include <Graphic3d_TextureMap.hxx>
0018 #include <NCollection_Array1.hxx>
0019 
0020 //! This abstract class for managing 3D textures.
0021 class Graphic3d_Texture3D : public Graphic3d_TextureMap
0022 {
0023   DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap)
0024 public:
0025   //! Creates a texture from a file.
0026   Standard_EXPORT Graphic3d_Texture3D(const TCollection_AsciiString& theFileName);
0027 
0028   //! Creates a texture from the pixmap.
0029   Standard_EXPORT Graphic3d_Texture3D(const occ::handle<Image_PixMap>& thePixMap);
0030 
0031   //! Creates a texture from a file.
0032   Standard_EXPORT Graphic3d_Texture3D(const NCollection_Array1<TCollection_AsciiString>& theFiles);
0033 
0034   //! Destructor.
0035   Standard_EXPORT ~Graphic3d_Texture3D() override;
0036 
0037   //! Assign new image to the texture.
0038   //! Note that this method does not invalidate already uploaded resources - consider calling
0039   //! ::UpdateRevision() if needed.
0040   Standard_EXPORT void SetImage(const occ::handle<Image_PixMap>& thePixMap);
0041 
0042   //! Load and return image.
0043   Standard_EXPORT occ::handle<Image_PixMap> GetImage(
0044     const occ::handle<Image_SupportedFormats>& theSupported) override;
0045 
0046 protected:
0047   NCollection_Array1<TCollection_AsciiString> myPaths;
0048 };
0049 
0050 #endif // _Graphic3d_Texture3D_HeaderFile