13#ifndef vtkAnariDevice_h
14#define vtkAnariDevice_h
17#include "vtkRenderingAnariModule.h"
19#include <anari/anari_cpp.hpp>
23VTK_ABI_NAMESPACE_BEGIN
25class vtkAnariDeviceInternals;
50 const char* libraryName,
const char* deviceName,
bool enableDebugLayer =
false);
87 vtkAnariDeviceInternals* Internal{
nullptr };
base class to objects which create + manage a ANARI library + device
anari::Device GetHandle() const
Get the current ANARI device, which will be NULL if not yet setup.
bool SetupAnariDeviceFromLibrary(const char *libraryName, const char *deviceName, bool enableDebugLayer=false)
Initialize this vtkAnariDevice from the name of an anari::Library and anari::Device to be loaded.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAnariDevice * New()
vtkAnariDevice()
Default constructor.
bool AnariInitialized() const
Check if ANARI has been initialized with SetupAnariDeviceFromLibrary.
void SetAnariDebugConfig(const char *traceDir, const char *traceMode)
Setup the trace directory and trace mode strings for the debug device for when SetupAnariDeviceFromLi...
std::function< void(anari::Device)> OnNewDeviceCallback
virtual ~vtkAnariDevice()
Destructor.
const anari::Extensions & GetAnariDeviceExtensions() const
Get the current ANARI device extensions, which will be empty if not yet setup.
void SetOnNewDeviceCallback(OnNewDeviceCallback &&cb)
Set a callback that gets called whenever a new device has been created.
a simple class to control print indentation
abstract base class for most VTK objects