VTK  9.7.20261203
vtkAnariOverlayAdapter.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
24
25#ifndef vtkAnariOverlayAdapter_h
26#define vtkAnariOverlayAdapter_h
27
28#include "vtkRenderingAnariCoreModule.h" // For export macro
29
30#include <set> // For std::set
31#include <string> // For std::string
32
34{
35VTK_ABI_NAMESPACE_BEGIN
36class Canvas;
37VTK_ABI_NAMESPACE_END
38}
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkRenderWindow;
42class vtkRenderer;
43class vtkTexture;
44
45class VTKRENDERINGANARICORE_NO_EXPORT vtkAnariOverlayAdapter
46{
47public:
49
55 void Draw(vtkRenderWindow* window, unsigned char* rgba, int width, int height);
56
61 vtkAnariOverlays::Canvas* GetActiveCanvas() const { return this->ActiveCanvas; }
62
67 void BindTexture(vtkTexture* texture) { this->BoundTexture = texture; }
68 vtkTexture* GetBoundTexture() const { return this->BoundTexture; }
69
70private:
71 void DrawRenderer(vtkRenderer* renderer, bool isMain);
72 void ReportSkipped(const std::string& what);
73
74 // Whether 2D props get vtkAnariPolyDataMapper2D from the object factory.
75 const bool Anari2D;
76 std::set<std::string> ReportedSkips;
77 vtkAnariOverlays::Canvas* ActiveCanvas = nullptr;
78 vtkTexture* BoundTexture = nullptr;
79};
80
81VTK_ABI_NAMESPACE_END
82#endif
83// VTK-HeaderTest-Exclude: vtkAnariOverlayAdapter.h
void BindTexture(vtkTexture *texture)
The texture 2D mappers sample, like OpenGL's bound texture: a vtkTexture binds itself while its prop ...
vtkAnariOverlays::Canvas * GetActiveCanvas() const
The canvas wrapping the frame while Draw runs, else nullptr.
void Draw(vtkRenderWindow *window, unsigned char *rgba, int width, int height)
Draw the overlays of window's renderers into rgba, the RGBA8 color buffer (row 0 at the bottom) of th...
vtkTexture * GetBoundTexture() const
Draws overlay primitives into a caller-owned RGBA8 image.
create a window for renderers to draw into
abstract specification for renderers
handles properties associated with a texture map
Definition vtkTexture.h:168