24 #ifndef vtkAnariSceneGraph_h
25 #define vtkAnariSceneGraph_h
28 #include "vtkRenderingAnariModule.h"
30 #include <anari/anari_cpp.hpp>
32 VTK_ABI_NAMESPACE_BEGIN
39 class vtkAnariSceneGraphInternals;
54 void Build(
bool prepass)
override;
59 void Render(
bool prepass)
override;
74 void SetUpdateWorldOnly(
bool onlyUpdateWorld =
false);
86 static void SetAccumulationCount(
vtkRenderer* renderer,
int);
87 static int GetAccumulationCount(
vtkRenderer* renderer);
100 static void SetCompositeOnGL(
vtkRenderer* renderer,
int);
101 static int GetCompositeOnGL(
vtkRenderer* renderer);
114 void AddLight(anari::Light);
122 void AddSurface(anari::Surface);
129 void AddVolume(anari::Volume);
134 void SetCamera(anari::Camera);
140 anari::Device GetDeviceHandle()
const;
145 anari::Renderer GetRendererHandle()
const;
150 const anari::Extensions& GetAnariDeviceExtensions()
const;
156 const char*
const* GetAnariDeviceExtensionStrings()
const;
162 virtual const unsigned char* GetBuffer();
167 virtual const float* GetZBuffer();
171 virtual void Traverse(
int operation)
override;
181 virtual void WriteLayer(
unsigned char* buffer,
float* zbuffer,
int buffx,
int buffy,
int layer);
186 void InvalidateSceneStructure();
227 void SetupAnariRendererParameters(
vtkRenderer* ren);
228 void InitAnariWorld();
229 void UpdateAnariFrameSize();
230 void UpdateAnariLights();
231 void UpdateAnariSurfaces();
232 void UpdateAnariVolumes();
233 void CopyAnariFrameBufferData();
234 void DebugOutputWorldBounds();
235 void ResetReservedPropIds();
237 vtkAnariSceneGraphInternals* Internal{
nullptr };
250 void SetAnariDevice(
vtkAnariDevice* ad, anari::Extensions e,
const char*
const* es);
251 void SetAnariRenderer(anari::Renderer r);
257 VTK_ABI_NAMESPACE_END
vtkTypeUInt32 vtkMTimeType
record modification and/or execution time
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
vtkTimeStamp AnariSceneStructureModifiedMTime
std::map< std::string, std::vector< std::string > > IssuedWarnings
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a renderer-agnostic collection of materials for VTK apps to draw from
a simple class to control print indentation
a render pass that uses ANARI (ANAlytic Rendering Interface) instead of OpenGL.
vtkTimeStamp AnariRendererModifiedTime
virtual void Render(bool)
Makes calls to make self visible.
vtkViewNode specialized for vtkRenderers
virtual void Invalidate(bool)
Clear any cached data.
base class to objects which create + manage a ANARI library + device
static vtkRendererNode * New()
virtual void Traverse(int operation)
void Build(bool prepass) override
Build containers for our child nodes.
links vtkRenderers to ANARI