VTK
9.3.0
Rendering
FFMPEGOpenGL2
vtkOpenGLMovieSphere.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
23
#ifndef vtkOpenGLMovieSphere_h
24
#define vtkOpenGLMovieSphere_h
25
26
#include "
vtkNew.h
"
// for ivars
27
#include "
vtkOpenGLSkybox.h
"
28
#include "vtkRenderingFFMPEGOpenGL2Module.h"
// For export macro
29
#include "
vtkSmartPointer.h
"
// for ivars
30
#include <atomic>
// for ivars
31
#include <mutex>
// for ivars
32
33
VTK_ABI_NAMESPACE_BEGIN
34
class
vtkFFMPEGVideoSource
;
35
struct
vtkFFMPEGVideoSourceVideoCallbackData
;
36
class
vtkMutexLock;
37
class
vtkOpenGLActor
;
38
class
vtkOpenGLPolyDataMapper
;
39
class
vtkTextureObject
;
40
41
class
VTKRENDERINGFFMPEGOPENGL2_EXPORT
vtkOpenGLMovieSphere
:
public
vtkOpenGLSkybox
42
{
43
public
:
44
static
vtkOpenGLMovieSphere
*
New
();
45
vtkTypeMacro(
vtkOpenGLMovieSphere
,
vtkOpenGLSkybox
);
46
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
47
51
void
Render
(
vtkRenderer
* ren,
vtkMapper
* mapper)
override
;
52
53
void
SetVideoSource
(
vtkFFMPEGVideoSource
* val);
54
vtkFFMPEGVideoSource
*
GetVideoSource
();
55
56
protected
:
57
vtkOpenGLMovieSphere
();
58
~vtkOpenGLMovieSphere
()
override
;
59
60
void
UpdateUniforms
(
vtkObject
*,
unsigned
long
,
void
*);
61
62
vtkNew<vtkTextureObject>
Textures[6];
63
int
BuildIndex
;
64
int
DrawIndex
;
65
int
YTexture
;
66
int
UTexture
;
67
int
VTexture
;
68
69
void
VideoCallback
(
vtkFFMPEGVideoSourceVideoCallbackData
const
& cbd);
70
71
std::mutex
TextureUpdateMutex
;
72
unsigned
char
* TextureData[6];
73
int
ReadIndex
;
// access only within mutex
74
int
WriteIndex
;
75
76
std::atomic<int>
NewData
;
77
std::atomic<int>
HaveData
;
78
79
int
Height
;
80
int
Width
;
81
int
UVHeight
;
82
int
UVWidth
;
83
vtkSmartPointer<vtkFFMPEGVideoSource>
VideoSource
;
84
85
private
:
86
vtkOpenGLMovieSphere
(
const
vtkOpenGLMovieSphere
&) =
delete
;
87
void
operator=(
const
vtkOpenGLMovieSphere
&) =
delete
;
88
};
89
90
VTK_ABI_NAMESPACE_END
91
#endif
vtkFFMPEGVideoSource
Reader for ffmpeg supported formats.
Definition:
vtkFFMPEGVideoSource.h:60
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition:
vtkMapper.h:86
vtkNew< vtkTextureObject >
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:61
vtkOpenGLActor
OpenGL actor.
Definition:
vtkOpenGLActor.h:24
vtkOpenGLMovieSphere
OpenGL MovieSphere, an optimized VR sphere for movies.
Definition:
vtkOpenGLMovieSphere.h:42
vtkOpenGLMovieSphere::NewData
std::atomic< int > NewData
Definition:
vtkOpenGLMovieSphere.h:76
vtkOpenGLMovieSphere::SetVideoSource
void SetVideoSource(vtkFFMPEGVideoSource *val)
vtkOpenGLMovieSphere::Render
void Render(vtkRenderer *ren, vtkMapper *mapper) override
Actual MovieSphere render method.
vtkOpenGLMovieSphere::~vtkOpenGLMovieSphere
~vtkOpenGLMovieSphere() override
vtkOpenGLMovieSphere::VTexture
int VTexture
Definition:
vtkOpenGLMovieSphere.h:67
vtkOpenGLMovieSphere::WriteIndex
int WriteIndex
Definition:
vtkOpenGLMovieSphere.h:74
vtkOpenGLMovieSphere::Height
int Height
Definition:
vtkOpenGLMovieSphere.h:79
vtkOpenGLMovieSphere::DrawIndex
int DrawIndex
Definition:
vtkOpenGLMovieSphere.h:64
vtkOpenGLMovieSphere::GetVideoSource
vtkFFMPEGVideoSource * GetVideoSource()
vtkOpenGLMovieSphere::Width
int Width
Definition:
vtkOpenGLMovieSphere.h:80
vtkOpenGLMovieSphere::UVWidth
int UVWidth
Definition:
vtkOpenGLMovieSphere.h:82
vtkOpenGLMovieSphere::VideoCallback
void VideoCallback(vtkFFMPEGVideoSourceVideoCallbackData const &cbd)
vtkOpenGLMovieSphere::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLMovieSphere::BuildIndex
int BuildIndex
Definition:
vtkOpenGLMovieSphere.h:63
vtkOpenGLMovieSphere::vtkOpenGLMovieSphere
vtkOpenGLMovieSphere()
vtkOpenGLMovieSphere::ReadIndex
int ReadIndex
Definition:
vtkOpenGLMovieSphere.h:73
vtkOpenGLMovieSphere::TextureUpdateMutex
std::mutex TextureUpdateMutex
Definition:
vtkOpenGLMovieSphere.h:71
vtkOpenGLMovieSphere::YTexture
int YTexture
Definition:
vtkOpenGLMovieSphere.h:65
vtkOpenGLMovieSphere::New
static vtkOpenGLMovieSphere * New()
vtkOpenGLMovieSphere::UTexture
int UTexture
Definition:
vtkOpenGLMovieSphere.h:66
vtkOpenGLMovieSphere::HaveData
std::atomic< int > HaveData
Definition:
vtkOpenGLMovieSphere.h:77
vtkOpenGLMovieSphere::UpdateUniforms
void UpdateUniforms(vtkObject *, unsigned long, void *)
vtkOpenGLMovieSphere::UVHeight
int UVHeight
Definition:
vtkOpenGLMovieSphere.h:81
vtkOpenGLMovieSphere::VideoSource
vtkSmartPointer< vtkFFMPEGVideoSource > VideoSource
Definition:
vtkOpenGLMovieSphere.h:83
vtkOpenGLPolyDataMapper
PolyDataMapper using OpenGL to render.
Definition:
vtkOpenGLPolyDataMapper.h:58
vtkOpenGLSkybox
OpenGL Skybox.
Definition:
vtkOpenGLSkybox.h:26
vtkRenderer
abstract specification for renderers
Definition:
vtkRenderer.h:71
vtkSmartPointer< vtkFFMPEGVideoSource >
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:33
vtkFFMPEGVideoSourceVideoCallbackData
Definition:
vtkFFMPEGVideoSource.h:51
vtkNew.h
vtkOpenGLSkybox.h
vtkSmartPointer.h
Generated on Sat Apr 6 2024 13:17:22 for VTK by
1.9.1