24#ifndef vtkAnariSceneGraph_h
25#define vtkAnariSceneGraph_h
28#include "vtkRenderingAnariModule.h"
30#include <anari/anari_cpp.hpp>
32VTK_ABI_NAMESPACE_BEGIN
38class vtkAnariSceneGraphInternals;
51 virtual void Build(
bool prepass)
override;
56 virtual void Render(
bool prepass)
override;
170 virtual void WriteLayer(
unsigned char* buffer,
float* zbuffer,
int buffx,
int buffy,
int layer);
191 vtkAnariSceneGraphInternals* Internal{
nullptr };
202 void SetAnariDevice(anari::Device d, anari::Extensions e);
203 void SetAnariRenderer(anari::Renderer r);
207 friend class vtkAnariWindowNode;
a render pass that uses ANARI (ANAlytic Rendering Interface) instead of OpenGL.
links vtkRenderers to ANARI
static void SetCompositeOnGL(vtkRenderer *renderer, int)
Convenience method to set/get COMPOSITE_ON_GL on a vtkRenderer.
virtual const unsigned char * GetBuffer()
Get the last rendered ColorBuffer.
void SetupAnariRendererParameters(vtkRenderer *ren)
void AddSurface(anari::Surface)
Accessed by the AnariPolyDataMapperNode to an ANARISurface to the world.
void UpdateAnariFrameSize()
void InitAnariFrame(vtkRenderer *ren)
anari::Device GetDeviceHandle() const
Get the ANARI back-end device.
void SetCamera(anari::Camera)
Accessed by the AnariCameraNode to set the ANARICamera on the ANARIFrame.
void AddLight(anari::Light)
Methods for other nodes to access.
static int GetAccumulationCount(vtkRenderer *renderer)
void InvalidateSceneStructure()
Indicate that a new RenderTraversal of children needs to occur next frame.
anari::Renderer GetRendererHandle() const
Get the currently set ANARI renderer.
virtual void WriteLayer(unsigned char *buffer, float *zbuffer, int buffx, int buffy, int layer)
Put my results into the correct place in the provided pixel buffer.
void CopyAnariFrameBufferData()
virtual void Traverse(int operation) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTimeStamp AnariSceneStructureModifiedMTime
static vtkInformationIntegerKey * ACCUMULATION_COUNT()
Set the number of frames to render which are accumulated to result in a better converged image.
void UpdateAnariVolumes()
vtkTimeStamp AnariRendererModifiedTime
void SetUpdateWorldOnly(bool onlyUpdateWorld=false)
When passing 'true', the renderer will skip actually rendering frame.
virtual void Build(bool prepass) override
Builds objects for this renderer.
static vtkInformationIntegerKey * COMPOSITE_ON_GL()
used to make the renderer add ANARI's content onto GL rendered content on the window
void AddVolume(anari::Volume)
Accessed by the AnariVolumeMapperNode to add Volumes to the world.
void DebugOutputWorldBounds()
static vtkAnariSceneGraph * New()
virtual void Render(bool prepass) override
Traverse graph in ANARI's preferred order and render.
static void SetAccumulationCount(vtkRenderer *renderer, int)
Convenience method to set/get ACCUMULATION_COUNT on a vtkRenderer.
virtual const float * GetZBuffer()
Get the last rendered ZBuffer.
const anari::Extensions & GetAnariDeviceExtensions() const
Get the extensions supported by the current back-end device.
static int GetCompositeOnGL(vtkRenderer *renderer)
vtkRenderer * GetRenderer()
Convenience method to get and downcast renderable.
virtual void Invalidate(bool prepass) override
Invalidates cached rendering data.
void UpdateAnariSurfaces()
a simple class to control print indentation
vtkViewNode specialized for vtkRenderers
abstract specification for renderers
record modification and/or execution time
vtkTypeUInt32 vtkMTimeType