VTK-m
2.2
|
Mapper which turns vector data into arrow glyphs. More...
#include <ANARIMapperGlyphs.h>
Classes | |
struct | ANARIHandles |
Container of all relevant ANARI scene object handles. More... | |
Public Member Functions | |
ANARIMapperGlyphs (anari_cpp::Device device, const ANARIActor &actor={}, const char *name="<glyphs>", const vtkm::cont::ColorTable &colorTable=vtkm::cont::ColorTable::Preset::Default) | |
Constructor. More... | |
~ANARIMapperGlyphs () override | |
Destructor. More... | |
void | SetActor (const ANARIActor &actor) override |
Set the current actor on this mapper. More... | |
void | SetOffsetGlyphs (bool enabled) |
Offset the glyph in the direction of the vector at each point. 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 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 | 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::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 | |
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... | |
Private Attributes | |
std::shared_ptr< ANARIHandles > | Handles |
bool | Offset { false } |
GlyphArrays | Arrays |
Additional Inherited Members | |
Protected Member Functions inherited from vtkm::interop::anari::ANARIMapper | |
std::string | MakeObjectName (const char *suffix) const |
void | RefreshGroup () |
vtkm::cont::ColorTable & | GetColorTable () |
Protected Attributes inherited from vtkm::interop::anari::ANARIMapper | |
bool | Valid { false } |
bool | Current { false } |
Mapper which turns vector data into arrow glyphs.
This mapper creates ANARI cone
geometry for the primary field in the provided ANARIActor
.
vtkm::interop::anari::ANARIMapperGlyphs::ANARIMapperGlyphs | ( | anari_cpp::Device | device, |
const ANARIActor & | actor = {} , |
||
const char * | name = "<glyphs>" , |
||
const vtkm::cont::ColorTable & | colorTable = vtkm::cont::ColorTable::Preset::Default |
||
) |
Constructor.
|
override |
Destructor.
|
private |
Do the work to construct the basic ANARI arrays for the ANARIGeometry.
regenerate | Force the position/radius arrays are regenerated. |
|
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.
|
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.
|
overridevirtual |
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 from vtkm::interop::anari::ANARIMapper.
void vtkm::interop::anari::ANARIMapperGlyphs::SetOffsetGlyphs | ( | bool | enabled | ) |
Offset the glyph in the direction of the vector at each point.
This will cause the mapper to offset the glyph, making the arrow appear to be coming out of the point instead of going through it. This is useful for visualizing things like surface normals on a mesh.
|
private |
Update ANARIGeometry object with the latest data from the actor.
|
private |
|
private |
|
private |