Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created by: Kirill GAVRILOV
0002 // Copyright (c) 2019 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _Graphic3d_MediaTexture_HeaderFile
0016 #define _Graphic3d_MediaTexture_HeaderFile
0017 
0018 #include <Graphic3d_Texture2D.hxx>
0019 #include <Standard_Mutex.hxx>
0020 
0021 class Media_Frame;
0022 
0023 //! Texture adapter for Media_Frame.
0024 class Graphic3d_MediaTexture : public Graphic3d_Texture2D
0025 {
0026   DEFINE_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D)
0027 public:
0028 
0029   //! Main constructor.
0030   Standard_EXPORT Graphic3d_MediaTexture (const Handle(Standard_HMutex)& theMutex,
0031                                           Standard_Integer thePlane = -1);
0032 
0033   //! Image reader.
0034   Standard_EXPORT virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
0035 
0036   //! Return the frame.
0037   const Handle(Media_Frame)& Frame() const { return myFrame; }
0038 
0039   //! Set the frame.
0040   void SetFrame (const Handle(Media_Frame)& theFrame) { myFrame = theFrame; }
0041 
0042   //! Regenerate a new texture id
0043   void GenerateNewId() { generateId(); }
0044 
0045 protected:
0046 
0047   mutable Handle(Standard_HMutex) myMutex;
0048   Handle(Media_Frame)             myFrame;
0049   Standard_Integer                myPlane;
0050   mutable Handle(Image_PixMap)    myPixMapWrapper;
0051 
0052 };
0053 
0054 #endif // _Graphic3d_MediaTexture_HeaderFile