Go to the documentation of this file.
   11 #ifndef vtk_m_interop_anari_ANARIScene_h 
   12 #define vtk_m_interop_anari_ANARIScene_h 
   17 #include <type_traits> 
   63   template <
typename ANARIMapperType>
 
   64   ANARIMapperType& AddMapper(
const ANARIMapperType& mapper, 
bool visible = 
true);
 
   72   template <
typename ANARIMapperType>
 
   73   void ReplaceMapper(
const ANARIMapperType& newMapper, 
vtkm::IdComponent id, 
bool visible);
 
   81   bool HasMapperWithName(
const char* name) 
const;
 
  106   void RemoveMapper(
const char* name);
 
  109   void RemoveAllMappers();
 
  114   anari_cpp::Device GetDevice() 
const;
 
  119   anari_cpp::World GetANARIWorld();
 
  124   anari_cpp::Device Device{ 
nullptr };
 
  125   anari_cpp::World World{ 
nullptr };
 
  138 template <
typename ANARIMapperType>
 
  141   static_assert(std::is_base_of<ANARIMapper, ANARIMapperType>::value,
 
  142                 "Only ANARIMapper types can be added to ANARIScene");
 
  144   auto* name = mapper.GetName();
 
  153     this->
Mappers.push_back({ std::make_unique<ANARIMapperType>(mapper), visible });
 
  159 template <
typename ANARIMapperType>
 
  164   static_assert(std::is_base_of<ANARIMapper, ANARIMapperType>::value,
 
  165                 "Only ANARIMapper types can be added to ANARIScene");
 
  167   Mappers[id] = { std::make_unique<ANARIMapperType>(newMapper), visible };
 
  168   if (wasVisible || visible)
 
  
Definition: VtkmANARITypes.h:30
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
ANARIMapperType & AddMapper(const ANARIMapperType &mapper, bool visible=true)
Add a mapper to the scene.
Definition: ANARIScene.h:139
 
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
 
void ReplaceMapper(const ANARIMapperType &newMapper, vtkm::IdComponent id, bool visible)
Add a mapper to the scene.
Definition: ANARIScene.h:160
 
This is the base class used for all ANARI mappers.
Definition: ANARIMapper.h:37
 
std::unique_ptr< ANARIMapper > Mapper
Definition: ANARIScene.h:129
 
bool GetMapperVisible(vtkm::IdComponent id) const
Get the associated mapper by name.
 
Object which manages a collection of mappers representing a single scene.
Definition: ANARIScene.h:44
 
bool HasMapperWithName(const char *name) const
Ask whether a mapper has the passed in name or not.
 
ANARIMapper & GetMapper(vtkm::IdComponent id)
Get the associated mapper by index.
 
vtkm::IdComponent GetNumberOfMappers() const
Get number of mappers in this scene.
 
Definition: ANARIScene.h:127
 
std::vector< SceneMapper > Mappers
Definition: ANARIScene.h:133
 
vtkm::IdComponent GetMapperIndexByName(const char *name)
Get the index to the mapper with the given name.