VTK  9.7.20260910
vtkWebGPUImageSliceMapper.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
18
19#ifndef vtkWebGPUImageSliceMapper_h
20#define vtkWebGPUImageSliceMapper_h
21
22#include "vtkImageSliceMapper.h"
23#include "vtkNew.h" // for ivars
24#include "vtkRenderingWebGPUModule.h" // For export macro
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkActor;
29class vtkImageSlice;
31class vtkPolyData;
32class vtkRenderer;
33class vtkTexture;
34class vtkWindow;
35
36class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPUImageSliceMapper
37 : public vtkImageSliceMapper
38{
39public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
49 void Render(vtkRenderer* renderer, vtkImageSlice* prop) override;
50
54 void ReleaseGraphicsResources(vtkWindow* window) override;
55
56protected:
59
64
68
69 // The quad and the texture are rebuilt when the input, the displayed extent
70 // or the image property changes.
72 int BuiltExtent[6] = { 0, -1, 0, -1, 0, -1 };
73 // What the texture currently holds. MakeTextureData reads these to decide
74 // whether it can reuse the existing texture and the input's own memory.
75 int TextureSize[2] = { 0, 0 };
77
78private:
80 void operator=(const vtkWebGPUImageSliceMapper&) = delete;
81};
82#define vtkWebGPUImageSliceMapper_OVERRIDE_ATTRIBUTES \
83 vtkWebGPUImageSliceMapper::CreateOverrideAttributes()
84VTK_ABI_NAMESPACE_END
85#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
represents an image in a 3D scene
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:168
Attribute for vtkObjectFactory overrides.
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract specification for renderers
handles properties associated with a texture map
Definition vtkTexture.h:168
record modification and/or execution time
static vtkOverrideAttribute * CreateOverrideAttributes()
void BuildTexturedQuad(vtkImageSlice *prop)
Rebuild the quad and the texture that the proxy actor draws.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Render(vtkRenderer *renderer, vtkImageSlice *prop) override
Draw the slice.
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources held by the proxy actor and its texture.
static vtkWebGPUImageSliceMapper * New()
~vtkWebGPUImageSliceMapper() override
window superclass for vtkRenderWindow
Definition vtkWindow.h:62
#define VTK_MARSHALAUTO
#define VTK_NEWINSTANCE