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

Mapper which triangulates cells into ANARI triangle geometry. More...

#include <ANARIMapperTriangles.h>

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

Classes

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

Public Member Functions

 ANARIMapperTriangles (anari_cpp::Device device, const ANARIActor &actor={}, const std::string &name="<triangles>", const vtkm::cont::ColorTable &colorTable=vtkm::cont::ColorTable::Preset::Default)
 Constructor. More...
 
 ~ANARIMapperTriangles () override
 Destructor. More...
 
void SetActor (const ANARIActor &actor) override
 Set the current actor on this mapper. More...
 
void SetMapFieldAsAttribute (bool enabled) override
 Set whether fields from ANARIActor should end up as geometry attributes. 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 SetCalculateNormals (bool enabled)
 Set whether vertex.normal data should also be calculated when triangulating geometry. More...
 
anari_cpp::Geometry GetANARIGeometry () override
 Get the corresponding ANARIGeometry handle from this mapper. More...
 
anari_cpp::Surface GetANARISurface () override
 Get the corresponding ANARISurface 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)
 
bool GetMapFieldAsAttribute () const
 
virtual void SetANARIColorMapOpacityScale (vtkm::Float32 opacityScale)
 Set a scale factor for opacity (typically used for volumes). More...
 
virtual anari_cpp::SpatialField GetANARISpatialField ()
 Get the corresponding ANARISpatialField handle from this mapper. More...
 
virtual anari_cpp::Volume GetANARIVolume ()
 Get the corresponding ANARIVolume handle from this mapper. More...
 
anari_cpp::Group GetANARIGroup ()
 
anari_cpp::Instance GetANARIInstance ()
 
bool GroupIsEmpty () const
 

Private Member Functions

bool NeedToGenerateData () const
 
void ConstructArrays (bool regenerate=false)
 Do the work to construct the basic ANARI arrays for the ANARIGeometry. More...
 
void UpdateGeometry ()
 Update ANARIGeometry object with the latest data from the actor. More...
 
void UpdateMaterial ()
 Update ANARIMaterial object with the latest data from the actor. More...
 

Private Attributes

std::shared_ptr< ANARIHandlesHandles
 
bool CalculateNormals { false }
 
vtkm::IdComponent PrimaryField { 0 }
 
TriangleArrays Arrays
 
TriangleFieldArrays FieldArrays
 

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 triangulates cells into ANARI triangle geometry.

NOTE: This mapper will only color map values that are 1-component Float32 fields, otherwise they will be ignored. This restriction will allow 2-4 component fields in the future.

Constructor & Destructor Documentation

◆ ANARIMapperTriangles()

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

Constructor.

◆ ~ANARIMapperTriangles()

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

Destructor.

Member Function Documentation

◆ ConstructArrays()

void vtkm::interop::anari::ANARIMapperTriangles::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.

◆ GetANARIGeometry()

anari_cpp::Geometry vtkm::interop::anari::ANARIMapperTriangles::GetANARIGeometry ( )
overridevirtual

Get the corresponding ANARIGeometry handle from this mapper.

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

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

◆ GetANARISurface()

anari_cpp::Surface vtkm::interop::anari::ANARIMapperTriangles::GetANARISurface ( )
overridevirtual

Get the corresponding ANARISurface handle from this mapper.

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

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

◆ NeedToGenerateData()

bool vtkm::interop::anari::ANARIMapperTriangles::NeedToGenerateData ( ) const
private

◆ SetActor()

void vtkm::interop::anari::ANARIMapperTriangles::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::ANARIMapperTriangles::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.

◆ SetANARIColorMapValueRange()

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

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

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

◆ SetCalculateNormals()

void vtkm::interop::anari::ANARIMapperTriangles::SetCalculateNormals ( bool  enabled)

Set whether vertex.normal data should also be calculated when triangulating geometry.

◆ SetMapFieldAsAttribute()

void vtkm::interop::anari::ANARIMapperTriangles::SetMapFieldAsAttribute ( bool  enabled)
overridevirtual

Set whether fields from ANARIActor should end up as geometry attributes.

See ANARIMapper for more detail.

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

◆ UpdateGeometry()

void vtkm::interop::anari::ANARIMapperTriangles::UpdateGeometry ( )
private

Update ANARIGeometry object with the latest data from the actor.

◆ UpdateMaterial()

void vtkm::interop::anari::ANARIMapperTriangles::UpdateMaterial ( )
private

Update ANARIMaterial object with the latest data from the actor.

Member Data Documentation

◆ Arrays

TriangleArrays vtkm::interop::anari::ANARIMapperTriangles::Arrays
private

◆ CalculateNormals

bool vtkm::interop::anari::ANARIMapperTriangles::CalculateNormals { false }
private

◆ FieldArrays

TriangleFieldArrays vtkm::interop::anari::ANARIMapperTriangles::FieldArrays
private

◆ Handles

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

◆ PrimaryField

vtkm::IdComponent vtkm::interop::anari::ANARIMapperTriangles::PrimaryField { 0 }
private

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