0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Graphic3d / Graphic3d_MediaTexture.hxx
CommitLineData
98e6c6d1 1// Created by: Kirill GAVRILOV
2// Copyright (c) 2019 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _Graphic3d_MediaTexture_HeaderFile
16#define _Graphic3d_MediaTexture_HeaderFile
17
18#include <Graphic3d_Texture2D.hxx>
98e6c6d1 19#include <Standard_Mutex.hxx>
20
21class Media_Frame;
98e6c6d1 22
23//! Texture adapter for Media_Frame.
24class Graphic3d_MediaTexture : public Graphic3d_Texture2D
25{
26 DEFINE_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D)
27public:
28
29 //! Main constructor.
000c21fa 30 Standard_EXPORT Graphic3d_MediaTexture (const Handle(Standard_HMutex)& theMutex,
98e6c6d1 31 Standard_Integer thePlane = -1);
32
33 //! Image reader.
faff3767 34 Standard_EXPORT virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE;
98e6c6d1 35
36 //! Return the frame.
37 const Handle(Media_Frame)& Frame() const { return myFrame; }
38
39 //! Set the frame.
40 void SetFrame (const Handle(Media_Frame)& theFrame) { myFrame = theFrame; }
41
42 //! Regenerate a new texture id
43 void GenerateNewId() { generateId(); }
44
45protected:
46
000c21fa 47 mutable Handle(Standard_HMutex) myMutex;
48 Handle(Media_Frame) myFrame;
49 Standard_Integer myPlane;
50 mutable Handle(Image_PixMap) myPixMapWrapper;
98e6c6d1 51
52};
53
54#endif // _Graphic3d_MediaTexture_HeaderFile