Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::BufferBase Class Referenceabstract
+ Inheritance diagram for inviwo::BufferBase:

Public Member Functions

 BufferBase (size_t defaultSize, const DataFormatBase *defaultFormat, BufferUsage usage, BufferTarget target)
 
 BufferBase (const BufferBase &rhs)=default
 
BufferBaseoperator= (const BufferBase &that)=default
 
virtual BufferBaseclone () const override=0
 
void setSize (size_t size)
 
size_t getSize () const
 
bool empty () const
 
size_t getSizeInBytes () const
 
BufferUsage getBufferUsage () const
 
BufferTarget getBufferTarget () const
 
void setDataFormat (const DataFormatBase *format)
 
const DataFormatBasegetDataFormat () const
 
virtual void append (const BufferBase &)=0
 
virtual Document getInfo () const =0
 
- Public Member Functions inherited from inviwo::Data< BufferBase, BufferRepresentation >
const T * getRepresentation () const
 
std::shared_ptr< const T > getRepresentationShared () const
 
T * getEditableRepresentation ()
 
bool hasRepresentation () const
 
bool hasRepresentations () const
 
void addRepresentation (std::shared_ptr< BufferRepresentation > representation)
 
void removeRepresentation (const BufferRepresentation *representation)
 
void removeOtherRepresentations (const BufferRepresentation *representation)
 
void clearRepresentations ()
 
void invalidateAllOther (const BufferRepresentation *repr)
 
void updateResource (const ResourceMeta &meta) const
 

Static Public Attributes

static uvec3 colorCode
 
static const std::string classIdentifier
 
static const std::string dataName
 

Protected Attributes

size_t defaultSize_
 
BufferUsage usage_
 
BufferTarget target_
 
const DataFormatBasedefaultDataFormat_
 

Additional Inherited Members

- Public Types inherited from inviwo::Data< BufferBase, BufferRepresentation >
using self
 
using repr
 
- Protected Member Functions inherited from inviwo::Data< BufferBase, BufferRepresentation >
 Data (const Data< BufferBase, BufferRepresentation > &rhs)
 
 Data (Data< BufferBase, BufferRepresentation > &&rhs)=default
 
Data< BufferBase, BufferRepresentation > & operator= (const Data< BufferBase, BufferRepresentation > &that)
 
Data< BufferBase, BufferRepresentation > & operator= (Data< BufferBase, BufferRepresentation > &&that)=default
 
decltype(auto) getLastOr (F &&f, T &&fallback) const
 
void setLastAndInvalidateOther (F &&f, T &&value)
 

Member Function Documentation

◆ clone()

virtual BufferBase * inviwo::BufferBase::clone ( ) const
overridepure virtual

◆ setDataFormat()

void inviwo::BufferBase::setDataFormat ( const DataFormatBase * format)

Set the format of the data.

See also
DataFormatBase
Parameters
formatThe format of the data.

◆ setSize()

void inviwo::BufferBase::setSize ( size_t size)

Set the number of elements in the buffer. This is destructive, the data will not be preserved.

Note
Resizes the last valid representation and erases all representations. Last valid representation will remain valid after changing the size.

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