VTK-m  2.2
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::interop::anari::ANARIMapperVolume Struct Reference

Mapper which turns structured volumes into a single ANARI transferFunction1D volume. More...

#include <ANARIMapperVolume.h>

Inheritance diagram for vtkm::interop::anari::ANARIMapperVolume:
vtkm::interop::anari::ANARIMapper

Classes

struct  ANARIHandles
 Container of all relevant ANARI scene object handles. More...
 

Public Member Functions

 ANARIMapperVolume (anari_cpp::Device device, const ANARIActor &actor={}, const std::string &name="<volume>", const vtkm::cont::ColorTable &colorTable=vtkm::cont::ColorTable::Preset::Default)
 Constructor. More...
 
 ~ANARIMapperVolume () override
 Destructor. More...
 
void SetActor (const ANARIActor &actor) override
 Set the current actor on this mapper. More...
 
void SetANARIColorMap (anari_cpp::Array1D color, anari_cpp::Array1D opacity, bool releaseArrays=true) override
 Set color map arrays using raw ANARI array handles. More...
 
void SetANARIColorMapValueRange (const vtkm::Vec2f_32 &valueRange) override
 Set the value range (domain) for the color map. More...
 
void SetANARIColorMapOpacityScale (vtkm::Float32 opacityScale) override
 Set a scale factor for opacity. More...
 
anari_cpp::SpatialField GetANARISpatialField () override
 Get the corresponding ANARISpatialField handle from this mapper. More...
 
anari_cpp::Volume GetANARIVolume () override
 Get the corresponding ANARIVolume handle from this mapper. More...
 
- Public Member Functions inherited from vtkm::interop::anari::ANARIMapper
 ANARIMapper (anari_cpp::Device device, const ANARIActor &actor={}, const std::string &name="<noname>", const vtkm::cont::ColorTable &colorTable=vtkm::cont::ColorTable::Preset::Default)
 
virtual ~ANARIMapper ()=default
 
anari_cpp::Device GetDevice () const
 
const ANARIActorGetActor () const
 
const char * GetName () const
 
const vtkm::cont::ColorTableGetColorTable () const
 
void SetName (const char *name)
 
void SetColorTable (const vtkm::cont::ColorTable &colorTable)
 
virtual void SetMapFieldAsAttribute (bool enabled)
 Set whether fields from ANARIActor should end up as geometry attributes. More...
 
bool GetMapFieldAsAttribute () const
 
virtual anari_cpp::Geometry GetANARIGeometry ()
 Get the corresponding ANARIGeometry handle from this mapper. More...
 
virtual anari_cpp::Surface GetANARISurface ()
 Get the corresponding ANARISurface handle from this mapper. More...
 
anari_cpp::Group GetANARIGroup ()
 
anari_cpp::Instance GetANARIInstance ()
 
bool GroupIsEmpty () const
 

Private Member Functions

void ConstructArrays (bool regenerate=false)
 Do the work to construct the basic ANARI arrays for the ANARIGeometry. More...
 
void UpdateSpatialField ()
 Update ANARISpatialField object with the latest data from the actor. More...
 

Private Attributes

std::shared_ptr< ANARIHandlesHandles
 
StructuredVolumeArrays StructuredArrays
 
UntructuredVolumeArrays UnstructuredArrays
 

Additional Inherited Members

- Protected Member Functions inherited from vtkm::interop::anari::ANARIMapper
std::string MakeObjectName (const char *suffix) const
 
void RefreshGroup ()
 
vtkm::cont::ColorTableGetColorTable ()
 
- Protected Attributes inherited from vtkm::interop::anari::ANARIMapper
bool Valid { false }
 
bool Current { false }
 

Detailed Description

Mapper which turns structured volumes into a single ANARI transferFunction1D volume.

NOTE: This currently only supports Float32 scalar fields. In the future this mapper will also support Uint8, Uint16, and Float64 scalar fields.

Constructor & Destructor Documentation

◆ ANARIMapperVolume()

vtkm::interop::anari::ANARIMapperVolume::ANARIMapperVolume ( anari_cpp::Device  device,
const ANARIActor actor = {},
const std::string &  name = "<volume>",
const vtkm::cont::ColorTable colorTable = vtkm::cont::ColorTable::Preset::Default 
)

Constructor.

◆ ~ANARIMapperVolume()

vtkm::interop::anari::ANARIMapperVolume::~ANARIMapperVolume ( )
override

Destructor.

Member Function Documentation

◆ ConstructArrays()

void vtkm::interop::anari::ANARIMapperVolume::ConstructArrays ( bool  regenerate = false)
private

Do the work to construct the basic ANARI arrays for the ANARIGeometry.

Parameters
regenerateForce the position/radius arrays are regenerated.

◆ GetANARISpatialField()

anari_cpp::SpatialField vtkm::interop::anari::ANARIMapperVolume::GetANARISpatialField ( )
overridevirtual

Get the corresponding ANARISpatialField handle from this mapper.

NOTE: This handle is not retained, so applications should not release it.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ GetANARIVolume()

anari_cpp::Volume vtkm::interop::anari::ANARIMapperVolume::GetANARIVolume ( )
overridevirtual

Get the corresponding ANARIVolume handle from this mapper.

NOTE: This handle is not retained, so applications should not release it.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ SetActor()

void vtkm::interop::anari::ANARIMapperVolume::SetActor ( const ANARIActor actor)
overridevirtual

Set the current actor on this mapper.

See ANARIMapper for more detail.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ SetANARIColorMap()

void vtkm::interop::anari::ANARIMapperVolume::SetANARIColorMap ( anari_cpp::Array1D  color,
anari_cpp::Array1D  opacity,
bool  releaseArrays = true 
)
overridevirtual

Set color map arrays using raw ANARI array handles.

See ANARIMapper for more detail.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ SetANARIColorMapOpacityScale()

void vtkm::interop::anari::ANARIMapperVolume::SetANARIColorMapOpacityScale ( vtkm::Float32  opacityScale)
overridevirtual

Set a scale factor for opacity.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ SetANARIColorMapValueRange()

void vtkm::interop::anari::ANARIMapperVolume::SetANARIColorMapValueRange ( const vtkm::Vec2f_32 valueRange)
overridevirtual

Set the value range (domain) for the color map.

Reimplemented from vtkm::interop::anari::ANARIMapper.

◆ UpdateSpatialField()

void vtkm::interop::anari::ANARIMapperVolume::UpdateSpatialField ( )
private

Update ANARISpatialField object with the latest data from the actor.

Member Data Documentation

◆ Handles

std::shared_ptr<ANARIHandles> vtkm::interop::anari::ANARIMapperVolume::Handles
private

◆ StructuredArrays

StructuredVolumeArrays vtkm::interop::anari::ANARIMapperVolume::StructuredArrays
private

◆ UnstructuredArrays

UntructuredVolumeArrays vtkm::interop::anari::ANARIMapperVolume::UnstructuredArrays
private

The documentation for this struct was generated from the following file: