VTK-m
2.2
|
This is the base class used for all ANARI mappers. More...
#include <ANARIMapper.h>
Classes | |
struct | ANARIHandles |
Public Member Functions | |
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 ANARIActor & | GetActor () const |
const char * | GetName () const |
const vtkm::cont::ColorTable & | GetColorTable () const |
void | SetName (const char *name) |
void | SetColorTable (const vtkm::cont::ColorTable &colorTable) |
virtual void | SetActor (const ANARIActor &actor) |
Set the current actor on this mapper. More... | |
virtual void | SetMapFieldAsAttribute (bool enabled) |
Set whether fields from ANARIActor should end up as geometry attributes. More... | |
bool | GetMapFieldAsAttribute () const |
virtual void | SetANARIColorMap (anari_cpp::Array1D color, anari_cpp::Array1D opacity, bool releaseArrays=true) |
Set color map arrays using raw ANARI array handles. More... | |
virtual void | SetANARIColorMapValueRange (const vtkm::Vec2f_32 &valueRange) |
Set the value range (domain) for the color map. More... | |
virtual void | SetANARIColorMapOpacityScale (vtkm::Float32 opacityScale) |
Set a scale factor for opacity (typically used for volumes). More... | |
virtual anari_cpp::Geometry | GetANARIGeometry () |
Get the corresponding ANARIGeometry handle from this mapper. More... | |
virtual anari_cpp::SpatialField | GetANARISpatialField () |
Get the corresponding ANARISpatialField handle from this mapper. More... | |
virtual anari_cpp::Surface | GetANARISurface () |
Get the corresponding ANARISurface 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 |
Protected Member Functions | |
std::string | MakeObjectName (const char *suffix) const |
void | RefreshGroup () |
vtkm::cont::ColorTable & | GetColorTable () |
Protected Attributes | |
bool | Valid { false } |
bool | Current { false } |
Private Attributes | |
std::shared_ptr< ANARIHandles > | Handles |
ANARIActor | Actor |
vtkm::cont::ColorTable | ColorTable |
std::string | Name |
bool | MapFieldAsAttribute { true } |
This is the base class used for all ANARI mappers.
This class implements shared functionality of all ANARI mappers. All ANARI object handle lifetimes are tied to the lifetime of the mapper, including the device. Applications are not intended to ever release handles received from the mapper, unless they manually retain the handle. Additionally, ANARIMappers will update surface or volume objects if changes occur, such as changes to the color map or ANARIActor.
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 |
||
) |
|
virtualdefault |
const ANARIActor& vtkm::interop::anari::ANARIMapper::GetActor | ( | ) | const |
|
virtual |
Get the corresponding ANARIGeometry handle from this mapper.
NOTE: This handle is not retained, so applications should not release it.
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, vtkm::interop::anari::ANARIMapperPoints, and vtkm::interop::anari::ANARIMapperGlyphs.
anari_cpp::Group vtkm::interop::anari::ANARIMapper::GetANARIGroup | ( | ) |
anari_cpp::Instance vtkm::interop::anari::ANARIMapper::GetANARIInstance | ( | ) |
|
virtual |
Get the corresponding ANARISpatialField handle from this mapper.
NOTE: This handle is not retained, so applications should not release it.
Reimplemented in vtkm::interop::anari::ANARIMapperVolume.
|
virtual |
Get the corresponding ANARISurface handle from this mapper.
NOTE: This handle is not retained, so applications should not release it.
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, vtkm::interop::anari::ANARIMapperPoints, and vtkm::interop::anari::ANARIMapperGlyphs.
|
virtual |
Get the corresponding ANARIVolume handle from this mapper.
NOTE: This handle is not retained, so applications should not release it.
Reimplemented in vtkm::interop::anari::ANARIMapperVolume.
|
protected |
const vtkm::cont::ColorTable& vtkm::interop::anari::ANARIMapper::GetColorTable | ( | ) | const |
anari_cpp::Device vtkm::interop::anari::ANARIMapper::GetDevice | ( | ) | const |
bool vtkm::interop::anari::ANARIMapper::GetMapFieldAsAttribute | ( | ) | const |
const char* vtkm::interop::anari::ANARIMapper::GetName | ( | ) | const |
bool vtkm::interop::anari::ANARIMapper::GroupIsEmpty | ( | ) | const |
|
protected |
|
protected |
|
virtual |
Set the current actor on this mapper.
This sets the actor used to create the geometry. When the actor is changed the mapper will update all the corresponding ANARI objects accordingly. This will not cause new ANARI geometry handles to be made, rather the existing handles will be updated to reflect the new actor's data.
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, vtkm::interop::anari::ANARIMapperPoints, vtkm::interop::anari::ANARIMapperVolume, and vtkm::interop::anari::ANARIMapperGlyphs.
|
virtual |
Set color map arrays using raw ANARI array handles.
color | Color array used for color mapping. |
opacity | (unused/deprecated, will remove on future ANARI version) |
releaseArrays | If true this function will release the hanldes passed in. |
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, vtkm::interop::anari::ANARIMapperPoints, and vtkm::interop::anari::ANARIMapperVolume.
|
virtual |
Set a scale factor for opacity (typically used for volumes).
Reimplemented in vtkm::interop::anari::ANARIMapperVolume.
|
virtual |
Set the value range (domain) for the color map.
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, vtkm::interop::anari::ANARIMapperPoints, and vtkm::interop::anari::ANARIMapperVolume.
void vtkm::interop::anari::ANARIMapper::SetColorTable | ( | const vtkm::cont::ColorTable & | colorTable | ) |
|
virtual |
Set whether fields from ANARIActor
should end up as geometry attributes.
When this is disabled, the mapper will skip creating the data arrays associated with fields for when applications only want the raw geometry. This defaults to being enabled.
Reimplemented in vtkm::interop::anari::ANARIMapperTriangles, and vtkm::interop::anari::ANARIMapperPoints.
void vtkm::interop::anari::ANARIMapper::SetName | ( | const char * | name | ) |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
protected |