24#ifndef vtkAnariSceneGraph_h
25#define vtkAnariSceneGraph_h
28#include "vtkRenderingAnariModule.h"
30#include <anari/anari_cpp.hpp>
32VTK_ABI_NAMESPACE_BEGIN
38class vtkAnariSceneGraphInternals;
52 void Build(
bool prepass)
override;
179 virtual void WriteLayer(
unsigned char* buffer,
float* zbuffer,
int buffx,
int buffy,
int layer);
213 vtkAnariSceneGraphInternals* Internal{
nullptr };
226 void SetAnariDevice(
vtkAnariDevice* ad, anari::Extensions e,
const char*
const* es);
227 void SetAnariRenderer(anari::Renderer r);
base class to objects which create + manage a ANARI library + device
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 ResetReservedPropIds()
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
std::map< std::string, std::vector< std::string > > IssuedWarnings
void UpdateAnariVolumes()
vtkTimeStamp AnariRendererModifiedTime
void Invalidate(bool prepass) override
Invalidates cached rendering data.
void SetUpdateWorldOnly(bool onlyUpdateWorld=false)
When passing 'true', the renderer will skip actually rendering frame.
const char *const * GetAnariDeviceExtensionStrings() const
Get the extensions supported by the current back-end device.
void WarningMacroOnce(vtkSmartPointer< vtkObject > caller, const std::string &warning)
Convenience API to warn the user once per device per renderer per warning type.
void AddVolume(anari::Volume)
Accessed by the AnariVolumeMapperNode to add Volumes to the world.
void DebugOutputWorldBounds()
int ReservePropId()
Reserve an Id which is unique to a render call.
static vtkAnariSceneGraph * New()
void Build(bool prepass) override
Builds objects for this renderer.
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.
void Render(bool prepass) override
Traverse graph in ANARI's preferred order and render.
~vtkAnariSceneGraph() override
static int GetCompositeOnGL(vtkRenderer *renderer)
vtkRenderer * GetRenderer()
Convenience method to get and downcast renderable.
void UpdateAnariSurfaces()
a simple class to control print indentation
vtkViewNode specialized for vtkRenderers
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
record modification and/or execution time
vtkTypeUInt32 vtkMTimeType