Inviwo  0.9.10.1
Inviwo documentation
inviwo::BufferRAMPrecision< T, Target > Class Template Reference
+ Inheritance diagram for inviwo::BufferRAMPrecision< T, Target >:

Public Types

using type = T
 
- Public Types inherited from inviwo::DataRepresentation< BufferBase >
using ReprOwner = BufferBase
 

Public Member Functions

 BufferRAMPrecision (BufferUsage usage=BufferUsage::Static)
 
 BufferRAMPrecision (size_t size, BufferUsage usage=BufferUsage::Static)
 
 BufferRAMPrecision (std::vector< T > data, BufferUsage usage=BufferUsage::Static)
 
 BufferRAMPrecision (const BufferRAMPrecision< T, Target > &rhs)=default
 
BufferRAMPrecision< T, Target > & operator= (const BufferRAMPrecision< T, Target > &that)=default
 
virtual BufferRAMPrecision< T, Target > * clone () const override
 
virtual void setSize (size_t size) override
 
virtual size_t getSize () const override
 
virtual void * getData () override
 
virtual const void * getData () const override
 
std::vector< T > & getDataContainer ()
 
const std::vector< T > & getDataContainer () const
 
virtual void reserve (size_t size) override
 
virtual double getAsDouble (const size_t &pos) const override
 
virtual dvec2 getAsDVec2 (const size_t &pos) const override
 
virtual dvec3 getAsDVec3 (const size_t &pos) const override
 
virtual dvec4 getAsDVec4 (const size_t &pos) const override
 
virtual void setFromDouble (const size_t &pos, double val) override
 
virtual void setFromDVec2 (const size_t &pos, dvec2 val) override
 
virtual void setFromDVec3 (const size_t &pos, dvec3 val) override
 
virtual void setFromDVec4 (const size_t &pos, dvec4 val) override
 
virtual double getAsNormalizedDouble (const size_t &pos) const override
 
virtual dvec2 getAsNormalizedDVec2 (const size_t &pos) const override
 
virtual dvec3 getAsNormalizedDVec3 (const size_t &pos) const override
 
virtual dvec4 getAsNormalizedDVec4 (const size_t &pos) const override
 
virtual void setFromNormalizedDouble (const size_t &pos, double val) override
 
virtual void setFromNormalizedDVec2 (const size_t &pos, dvec2 val) override
 
virtual void setFromNormalizedDVec3 (const size_t &pos, dvec3 val) override
 
virtual void setFromNormalizedDVec4 (const size_t &pos, dvec4 val) override
 
void add (const T &item)
 
void add (std::initializer_list< T > data)
 
void append (const std::vector< T > *data)
 
void append (const std::vector< T > &data)
 
T & operator[] (size_t i)
 
const T & operator[] (size_t i) const
 
void set (size_t index, const T &item)
 
get (size_t index) const
 
T & get (size_t index)
 
virtual void clear () override
 
- Public Member Functions inherited from inviwo::BufferRAM
 BufferRAM (const DataFormatBase *format, BufferUsage usage=BufferUsage::Static, BufferTarget target=BufferTarget::Data)
 
 BufferRAM (const BufferRAM &rhs)=default
 
BufferRAMoperator= (const BufferRAM &that)=default
 
virtual std::type_index getTypeIndex () const override final
 
template<typename Result , template< class > class Predicate = dispatching::filter::All, typename Callable , typename... Args>
auto dispatch (Callable &&callable, Args &&... args) -> Result
 
template<typename Result , template< class > class Predicate = dispatching::filter::All, typename Callable , typename... Args>
auto dispatch (Callable &&callable, Args &&... args) const -> Result
 
- Public Member Functions inherited from inviwo::BufferRepresentation
virtual size_t getSizeOfElement () const
 
BufferUsage getBufferUsage () const
 
BufferTarget getBufferTarget () const
 
- Public Member Functions inherited from inviwo::DataRepresentation< BufferBase >
const DataFormatBasegetDataFormat () const
 
std::string getDataFormatString () const
 
DataFormatId getDataFormatId () const
 
void setOwner (BufferBase *owner)
 
BufferBasegetOwner ()
 
const BufferBasegetOwner () const
 
bool isValid () const
 
void setValid (bool valid)
 

Static Public Attributes

static const BufferTarget target = Target
 

Additional Inherited Members

- Protected Member Functions inherited from inviwo::BufferRepresentation
 BufferRepresentation (const DataFormatBase *format, BufferUsage usage=BufferUsage::Static, BufferTarget target=BufferTarget::Data)
 
 BufferRepresentation (const BufferRepresentation &rhs)=default
 
BufferRepresentationoperator= (const BufferRepresentation &that)=default
 
- Protected Member Functions inherited from inviwo::DataRepresentation< BufferBase >
 DataRepresentation (const DataFormatBase *format)
 
 DataRepresentation (const DataRepresentation &rhs)=default
 
DataRepresentationoperator= (const DataRepresentation &that)=default
 
void setDataFormat (const DataFormatBase *format)
 
- Protected Attributes inherited from inviwo::BufferRepresentation
BufferUsage usage_
 
BufferTarget target_
 
- Protected Attributes inherited from inviwo::DataRepresentation< BufferBase >
bool isValid_
 
const DataFormatBasedataFormatBase_
 
BufferBaseowner_
 

Member Function Documentation

◆ getSize()

template<typename T , BufferTarget Target>
size_t inviwo::BufferRAMPrecision< T, Target >::getSize ( ) const
overridevirtual

Return the number of elements in the buffer.

Implements inviwo::BufferRepresentation.


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