Cogs.Core
Public Member Functions | Public Attributes | List of all members
Cogs::Core::DataStream Struct Reference

Contains a stream of data used by Mesh resources. More...

#include <Mesh.h>

Public Member Functions

 DataStream ()=default
 Construct a default data stream.
 
 DataStream (const DataStream &other)=delete
 Disable copy constructing data streams.
 
 DataStream (DataStream &&other)=default
 Move construct the data stream from other.
 
COGSCORE_DLL_API void * data ()
 
COGSCORE_DLL_API const void * data () const
 
COGSCORE_DLL_API size_t size () const
 

Public Attributes

Cogs::Core::ResourceBufferHandle buffer
 Data buffer.
 
VertexFormatHandle format
 A pointer to the format describing the contents of the byte buffer.
 
uint32_t offset = 0
 Byte offset from the start of the buffer.
 
uint32_t stride = 0
 Element stride.
 
uint32_t numElements = 0
 Number of elements of the type given by format contained in data.
 
VertexDataType::EVertexDataType type = VertexDataType::Reserved
 Type index used to index streams in a Mesh resource.
 

Detailed Description

Contains a stream of data used by Mesh resources.

A data stream contains a byte buffer and description of the type of contents in the buffer.

Definition at line 79 of file Mesh.h.

Member Function Documentation

◆ data() [1/2]

void * Cogs::Core::DataStream::data ( )

Definition at line 287 of file Mesh.cpp.

◆ data() [2/2]

const void * Cogs::Core::DataStream::data ( ) const

Definition at line 288 of file Mesh.cpp.

◆ size()

size_t Cogs::Core::DataStream::size ( ) const

Definition at line 289 of file Mesh.cpp.

Member Data Documentation

◆ buffer

Cogs::Core::ResourceBufferHandle Cogs::Core::DataStream::buffer

Data buffer.

Definition at line 96 of file Mesh.h.

Referenced by Cogs::Core::Mesh::getStream(), and Cogs::Core::Mesh::mapStream().

◆ format

VertexFormatHandle Cogs::Core::DataStream::format

A pointer to the format describing the contents of the byte buffer.

Definition at line 99 of file Mesh.h.

Referenced by Cogs::Core::Mesh::getSemanticStream(), and Cogs::Core::Mesh::mapStream().

◆ numElements

uint32_t Cogs::Core::DataStream::numElements = 0

Number of elements of the type given by format contained in data.

Definition at line 108 of file Mesh.h.

Referenced by Cogs::Core::generateMeshNormals(), Cogs::Core::Mesh::getSemanticStream(), and Cogs::Core::Mesh::mapStream().

◆ offset

uint32_t Cogs::Core::DataStream::offset = 0

Byte offset from the start of the buffer.

Definition at line 102 of file Mesh.h.

◆ stride

uint32_t Cogs::Core::DataStream::stride = 0

Element stride.

Definition at line 105 of file Mesh.h.

Referenced by Cogs::Core::Mesh::mapStream().

◆ type

VertexDataType::EVertexDataType Cogs::Core::DataStream::type = VertexDataType::Reserved

Type index used to index streams in a Mesh resource.

Definition at line 111 of file Mesh.h.

Referenced by Cogs::Core::Mesh::getStream().


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