VTK-m
2.0
|
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 |
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.
VTKM_CONT vtkm::rendering::raytracing::ChannelBuffer< Precision >::ChannelBuffer | ( | ) |
Functions we want accessble outside of vtkm some of which execute on a device.
VTKM_CONT vtkm::rendering::raytracing::ChannelBuffer< Precision >::ChannelBuffer | ( | const vtkm::Int32 | numChannels, |
const vtkm::Id | size | ||
) |
|
inline |
Functions that are calleble within vtkm where the device is already known.
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::AddBuffer | ( | const ChannelBuffer< Precision > & | other | ) |
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::Copy | ( | ) |
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::ExpandBuffer | ( | vtkm::cont::ArrayHandle< vtkm::Id > | sparseIndexes, |
const vtkm::Id | outputSize, | ||
Precision | initValue = 1.f |
||
) |
ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::ExpandBuffer | ( | vtkm::cont::ArrayHandle< vtkm::Id > | sparseIndexes, |
const vtkm::Id | outputSize, | ||
vtkm::cont::ArrayHandle< Precision > | signature | ||
) |
vtkm::Id vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetBufferLength | ( | ) | const |
VTKM_CONT ChannelBuffer<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetChannel | ( | const vtkm::Int32 | channel | ) |
std::string vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetName | ( | ) | const |
vtkm::Int32 vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetNumChannels | ( | ) | const |
vtkm::Id vtkm::rendering::raytracing::ChannelBuffer< Precision >::GetSize | ( | ) | const |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::InitChannels | ( | const vtkm::cont::ArrayHandle< Precision > & | signature | ) |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::InitConst | ( | const Precision | value | ) |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::MultiplyBuffer | ( | const ChannelBuffer< Precision > & | other | ) |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::Normalize | ( | bool | invert | ) |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::Resize | ( | const vtkm::Id | newSize | ) |
|
inline |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::SetName | ( | const std::string | name | ) |
void vtkm::rendering::raytracing::ChannelBuffer< Precision >::SetNumChannels | ( | const vtkm::Int32 | numChannels | ) |
|
inline |
|
friend |
vtkm::cont::ArrayHandle<Precision> vtkm::rendering::raytracing::ChannelBuffer< Precision >::Buffer |
|
protected |
|
protected |
|
protected |