VTK-m  2.0
Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
vtkm::rendering::raytracing::ChannelBuffer< Precision > Class Template Reference

Mananges a buffer that contains many channels per value (e.g., RGBA values). More...

#include <ChannelBuffer.h>

Public Member Functions

VTKM_CONT ChannelBuffer ()
 Functions we want accessble outside of vtkm some of which execute on a device. More...
 
VTKM_CONT ChannelBuffer (const vtkm::Int32 numChannels, const vtkm::Id size)
 
VTKM_CONT ChannelBuffer< Precision > GetChannel (const vtkm::Int32 channel)
 
ChannelBuffer< Precision > ExpandBuffer (vtkm::cont::ArrayHandle< vtkm::Id > sparseIndexes, const vtkm::Id outputSize, vtkm::cont::ArrayHandle< Precision > signature)
 
ChannelBuffer< Precision > ExpandBuffer (vtkm::cont::ArrayHandle< vtkm::Id > sparseIndexes, const vtkm::Id outputSize, Precision initValue=1.f)
 
ChannelBuffer< Precision > Copy ()
 
void InitConst (const Precision value)
 
void InitChannels (const vtkm::cont::ArrayHandle< Precision > &signature)
 
void Normalize (bool invert)
 
void SetName (const std::string name)
 
void Resize (const vtkm::Id newSize)
 
void SetNumChannels (const vtkm::Int32 numChannels)
 
vtkm::Int32 GetNumChannels () const
 
vtkm::Id GetSize () const
 
vtkm::Id GetBufferLength () const
 
std::string GetName () const
 
void AddBuffer (const ChannelBuffer< Precision > &other)
 
void MultiplyBuffer (const ChannelBuffer< Precision > &other)
 
template<typename Device >
VTKM_CONT ChannelBuffer (const vtkm::Int32 size, const vtkm::Int32 numChannels, Device)
 Functions that are calleble within vtkm where the device is already known. More...
 
template<typename Device >
VTKM_CONT void SetNumChannels (const vtkm::Int32 numChannels, Device)
 
template<typename Device >
VTKM_CONT void Resize (const vtkm::Id newSize, Device device)
 

Public Attributes

vtkm::cont::ArrayHandle< Precision > Buffer
 

Protected Attributes

vtkm::Int32 NumChannels
 
vtkm::Id Size
 
std::string Name
 

Friends

class ChannelBufferOperations
 

Detailed Description

template<typename Precision>
class vtkm::rendering::raytracing::ChannelBuffer< Precision >

Mananges a buffer that contains many channels per value (e.g., RGBA values).

The ChannelBuffer class is meant to handle a buffer of values with potentially many channels. While RGBA values could be placed in a Vec<T,4>, data with a large number of channels (e.g., 100+ energy bins) are better handled by a raw array. Rays can have color, absorption, absorption + emission, or even track additional scalar values to support standards such as Cinema. This class allows us to treat all of these different use cases with the same type.

This class has methods that can be utilized by other VTK-m classes that already have a a device dapter specified, and can be used by external callers where the call executes on a device through the try execute mechanism.

Currently, the supported types are floating point to match the precision of the rays.

Constructor & Destructor Documentation

◆ ChannelBuffer() [1/3]

template<typename Precision >
VTKM_CONT vtkm::rendering::raytracing::ChannelBuffer< Precision >::ChannelBuffer ( )

Functions we want accessble outside of vtkm some of which execute on a device.

◆ ChannelBuffer() [2/3]

template<typename Precision >
VTKM_CONT vtkm::rendering::raytracing::ChannelBuffer< Precision >::ChannelBuffer ( const vtkm::Int32  numChannels,
const vtkm::Id  size 
)

◆ ChannelBuffer() [3/3]

template<typename Precision >
template<typename Device >
VTKM_CONT vtkm::rendering::raytracing::ChannelBuffer< Precision >::ChannelBuffer ( const vtkm::Int32  size,
const vtkm::Int32  numChannels,
Device   
)
inline

Functions that are calleble within vtkm where the device is already known.

Member Function Documentation

◆ AddBuffer()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::AddBuffer ( const ChannelBuffer< Precision > &  other)

◆ Copy()

template<typename Precision >
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::Copy ( )

◆ ExpandBuffer() [1/2]

template<typename Precision >
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::ExpandBuffer ( vtkm::cont::ArrayHandle< vtkm::Id sparseIndexes,
const vtkm::Id  outputSize,
Precision  initValue = 1.f 
)

◆ ExpandBuffer() [2/2]

template<typename Precision >
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::ExpandBuffer ( vtkm::cont::ArrayHandle< vtkm::Id sparseIndexes,
const vtkm::Id  outputSize,
vtkm::cont::ArrayHandle< Precision >  signature 
)

◆ GetBufferLength()

template<typename Precision >
vtkm::Id vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetBufferLength ( ) const

◆ GetChannel()

template<typename Precision >
VTKM_CONT ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetChannel ( const vtkm::Int32  channel)

◆ GetName()

template<typename Precision >
std::string vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetName ( ) const

◆ GetNumChannels()

template<typename Precision >
vtkm::Int32 vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetNumChannels ( ) const

◆ GetSize()

template<typename Precision >
vtkm::Id vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetSize ( ) const

◆ InitChannels()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::InitChannels ( const vtkm::cont::ArrayHandle< Precision > &  signature)

◆ InitConst()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::InitConst ( const Precision  value)

◆ MultiplyBuffer()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::MultiplyBuffer ( const ChannelBuffer< Precision > &  other)

◆ Normalize()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::Normalize ( bool  invert)

◆ Resize() [1/2]

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::Resize ( const vtkm::Id  newSize)

◆ Resize() [2/2]

template<typename Precision >
template<typename Device >
VTKM_CONT void vtkm::rendering::raytracing::ChannelBuffer< Precision >::Resize ( const vtkm::Id  newSize,
Device  device 
)
inline

◆ SetName()

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::SetName ( const std::string  name)

◆ SetNumChannels() [1/2]

template<typename Precision >
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::SetNumChannels ( const vtkm::Int32  numChannels)

◆ SetNumChannels() [2/2]

template<typename Precision >
template<typename Device >
VTKM_CONT void vtkm::rendering::raytracing::ChannelBuffer< Precision >::SetNumChannels ( const vtkm::Int32  numChannels,
Device   
)
inline

Friends And Related Function Documentation

◆ ChannelBufferOperations

template<typename Precision >
friend class ChannelBufferOperations
friend

Member Data Documentation

◆ Buffer

template<typename Precision >
vtkm::cont::ArrayHandle<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::Buffer

◆ Name

template<typename Precision >
std::string vtkm::rendering::raytracing::ChannelBuffer< Precision >::Name
protected

◆ NumChannels

template<typename Precision >
vtkm::Int32 vtkm::rendering::raytracing::ChannelBuffer< Precision >::NumChannels
protected

◆ Size

template<typename Precision >
vtkm::Id vtkm::rendering::raytracing::ChannelBuffer< Precision >::Size
protected

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