Assimp  v4.1. (December 2018)
glTF2::Accessor Struct Reference

A typed view into a BufferView. More...

Inherits glTF2::Object.

Classes

class  Indexer
 Helper class to iterate the data. More...
 

Public Member Functions

 Accessor ()
 
template<class T >
bool ExtractData (T *&outData)
 
unsigned int GetBytesPerComponent ()
 
unsigned int GetElementSize ()
 
Indexer GetIndexer ()
 
unsigned int GetNumComponents ()
 
uint8_tGetPointer ()
 
void Read (Value &obj, Asset &r)
 
void WriteData (size_t count, const void *src_buffer, size_t src_stride)
 
- Public Member Functions inherited from glTF2::Object
virtual bool IsSpecial () const
 Objects marked as special are not exported (used to emulate the binary body buffer) More...
 
virtual ~Object ()
 

Public Attributes

Ref< BufferViewbufferView
 The ID of the bufferView. (required) More...
 
size_t byteOffset
 The offset relative to the start of the bufferView in bytes. (required) More...
 
ComponentType componentType
 The datatype of components in the attribute. (required) More...
 
size_t count
 The number of attributes referenced by this accessor. (required) More...
 
std::vector< floatmax
 Maximum value of each component in this attribute. More...
 
std::vector< floatmin
 Minimum value of each component in this attribute. More...
 
AttribType::Value type
 Specifies if the attribute is a scalar, vector, or matrix. (required) More...
 
- Public Attributes inherited from glTF2::Object
std::string id
 The globally unique ID used to reference this object. More...
 
int index
 The index of this object within its property container. More...
 
std::string name
 The user-defined name of this object. More...
 
int oIndex
 The original index of this object defined in the JSON. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from glTF2::Object
static const char * TranslateId (Asset &, const char *id)
 Maps special IDs to another ID, where needed. Subclasses may override it (statically) More...
 

Detailed Description

A typed view into a BufferView.

A BufferView contains raw binary data. An accessor provides a typed view into a BufferView or a subset of a BufferView similar to how WebGL's vertexAttribPointer() defines an attribute in a buffer.

Constructor & Destructor Documentation

◆ Accessor()

glTF2::Accessor::Accessor ( )
inline

Member Function Documentation

◆ ExtractData()

template<class T >
bool glTF2::Accessor::ExtractData ( T *&  outData)

◆ GetBytesPerComponent()

unsigned int glTF2::Accessor::GetBytesPerComponent ( )
inline

◆ GetElementSize()

unsigned int glTF2::Accessor::GetElementSize ( )
inline

◆ GetIndexer()

Indexer glTF2::Accessor::GetIndexer ( )
inline

◆ GetNumComponents()

unsigned int glTF2::Accessor::GetNumComponents ( )
inline

◆ GetPointer()

uint8_t * glTF2::Accessor::GetPointer ( )
inline

◆ Read()

void glTF2::Accessor::Read ( Value obj,
Asset r 
)
inline

◆ WriteData()

void glTF2::Accessor::WriteData ( size_t  count,
const void *  src_buffer,
size_t  src_stride 
)
inline

Member Data Documentation

◆ bufferView

Ref<BufferView> glTF2::Accessor::bufferView

The ID of the bufferView. (required)

◆ byteOffset

size_t glTF2::Accessor::byteOffset

The offset relative to the start of the bufferView in bytes. (required)

◆ componentType

ComponentType glTF2::Accessor::componentType

The datatype of components in the attribute. (required)

◆ count

size_t glTF2::Accessor::count

The number of attributes referenced by this accessor. (required)

◆ max

std::vector<float> glTF2::Accessor::max

Maximum value of each component in this attribute.

◆ min

std::vector<float> glTF2::Accessor::min

Minimum value of each component in this attribute.

◆ type

AttribType::Value glTF2::Accessor::type

Specifies if the attribute is a scalar, vector, or matrix. (required)


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