Viskores
1.0
|
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 viskores::cont::ColorTable &colorTable=viskores::cont::ColorTable::Preset::Default) | |
virtual | ~ANARIMapper ()=default |
anari_cpp::Device | GetDevice () const |
const ANARIActor & | GetActor () const |
const char * | GetName () const |
const viskores::cont::ColorTable & | GetColorTable () const |
void | SetName (const char *name) |
void | SetColorTable (const viskores::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 viskores::Vec2f_32 &valueRange) |
Set the value range (domain) for the color map. More... | |
virtual void | SetANARIColorMapOpacityScale (viskores::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 () |
viskores::cont::ColorTable & | GetColorTable () |
Protected Attributes | |
bool | Valid { false } |
bool | Current { false } |
Private Attributes | |
std::shared_ptr< ANARIHandles > | Handles |
ANARIActor | Actor |
viskores::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.
viskores::interop::anari::ANARIMapper::ANARIMapper | ( | anari_cpp::Device | device, |
const ANARIActor & | actor = {} , |
||
const std::string & | name = "<noname>" , |
||
const viskores::cont::ColorTable & | colorTable = viskores::cont::ColorTable::Preset::Default |
||
) |
|
virtualdefault |
const ANARIActor& viskores::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 viskores::interop::anari::ANARIMapperTriangles, viskores::interop::anari::ANARIMapperPoints, and viskores::interop::anari::ANARIMapperGlyphs.
anari_cpp::Group viskores::interop::anari::ANARIMapper::GetANARIGroup | ( | ) |
anari_cpp::Instance viskores::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 viskores::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 viskores::interop::anari::ANARIMapperTriangles, viskores::interop::anari::ANARIMapperPoints, and viskores::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 viskores::interop::anari::ANARIMapperVolume.
|
protected |
const viskores::cont::ColorTable& viskores::interop::anari::ANARIMapper::GetColorTable | ( | ) | const |
anari_cpp::Device viskores::interop::anari::ANARIMapper::GetDevice | ( | ) | const |
bool viskores::interop::anari::ANARIMapper::GetMapFieldAsAttribute | ( | ) | const |
const char* viskores::interop::anari::ANARIMapper::GetName | ( | ) | const |
bool viskores::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 viskores::interop::anari::ANARIMapperTriangles, viskores::interop::anari::ANARIMapperPoints, viskores::interop::anari::ANARIMapperVolume, and viskores::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 viskores::interop::anari::ANARIMapperTriangles, viskores::interop::anari::ANARIMapperPoints, and viskores::interop::anari::ANARIMapperVolume.
|
virtual |
Set a scale factor for opacity (typically used for volumes).
Reimplemented in viskores::interop::anari::ANARIMapperVolume.
|
virtual |
Set the value range (domain) for the color map.
Reimplemented in viskores::interop::anari::ANARIMapperTriangles, viskores::interop::anari::ANARIMapperPoints, and viskores::interop::anari::ANARIMapperVolume.
void viskores::interop::anari::ANARIMapper::SetColorTable | ( | const viskores::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 viskores::interop::anari::ANARIMapperTriangles, and viskores::interop::anari::ANARIMapperPoints.
void viskores::interop::anari::ANARIMapper::SetName | ( | const char * | name | ) |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
protected |