VTK
9.3.20240329
Rendering
ContextOpenGL2
vtkOpenGLPropItem.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
3
15
#ifndef vtkOpenGLPropItem_h
16
#define vtkOpenGLPropItem_h
17
18
#include "
vtkNew.h
"
// for vtkNew
19
#include "
vtkPropItem.h
"
20
#include "vtkRenderingContextOpenGL2Module.h"
// For export macro
21
22
VTK_ABI_NAMESPACE_BEGIN
23
class
vtkCamera
;
24
25
class
VTKRENDERINGCONTEXTOPENGL2_EXPORT
vtkOpenGLPropItem
:
public
vtkPropItem
26
{
27
public
:
28
static
vtkOpenGLPropItem
*
New
();
29
vtkTypeMacro(
vtkOpenGLPropItem
,
vtkPropItem
);
30
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
31
32
bool
Paint
(
vtkContext2D
* painter)
override
;
33
34
protected
:
35
vtkOpenGLPropItem
();
36
~vtkOpenGLPropItem
()
override
;
37
38
// Sync the active vtkCamera with the GL state set by the painter.
39
void
UpdateTransforms
()
override
;
40
41
// Restore the vtkCamera state.
42
void
ResetTransforms
()
override
;
43
44
private
:
45
vtkNew<vtkCamera>
CameraCache;
46
vtkContext2D
* Painter;
47
48
vtkOpenGLPropItem
(
const
vtkOpenGLPropItem
&) =
delete
;
49
void
operator=(
const
vtkOpenGLPropItem
&) =
delete
;
50
};
51
52
VTK_ABI_NAMESPACE_END
53
#endif
// vtkOpenGLPropItem_h
vtkCamera
a virtual camera for 3D rendering
Definition:
vtkCamera.h:151
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition:
vtkContext2D.h:69
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:108
vtkNew< vtkCamera >
vtkOpenGLPropItem
Sync Context2D state with vtk camera.
Definition:
vtkOpenGLPropItem.h:26
vtkOpenGLPropItem::UpdateTransforms
void UpdateTransforms() override
vtkOpenGLPropItem::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
vtkOpenGLPropItem::New
static vtkOpenGLPropItem * New()
vtkOpenGLPropItem::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLPropItem::ResetTransforms
void ResetTransforms() override
vtkOpenGLPropItem::vtkOpenGLPropItem
vtkOpenGLPropItem()
vtkOpenGLPropItem::~vtkOpenGLPropItem
~vtkOpenGLPropItem() override
vtkPropItem
Embed a vtkProp in a vtkContextScene.
Definition:
vtkPropItem.h:27
vtkNew.h
vtkPropItem.h
Generated on Fri Mar 29 2024 08:57:07 for VTK by
1.9.1