GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
draco::GeometryAttribute Class Reference

#include <geometry_attribute.h>

Inheritance diagram for draco::GeometryAttribute:

Public Types

enum  Type {
  INVALID = -1 , POSITION = 0 , NORMAL , COLOR ,
  TEX_COORD , GENERIC , NAMED_ATTRIBUTES_COUNT
}

Public Member Functions

 GeometryAttribute ()
void Init (Type attribute_type, DataBuffer *buffer, uint8_t num_components, DataTypeDataType data_type, bool normalized, int64_t byte_stride, int64_t byte_offset)
bool IsValid () const
bool CopyFrom (const GeometryAttribute &src_att)
template<typename T, int att_components_t>
std::array< T, att_components_t > GetValue (AttributeValueIndex att_index) const
template<typename T, int att_components_t>
bool GetValue (AttributeValueIndex att_index, std::array< T, att_components_t > *out) const
int64_t GetBytePos (AttributeValueIndex att_index) const
const uint8_t * GetAddress (AttributeValueIndex att_index) const
uint8_t * GetAddress (AttributeValueIndex att_index)
bool IsAddressValid (const uint8_t *address) const
void GetValue (AttributeValueIndex att_index, void *out_data) const
void SetAttributeValue (AttributeValueIndex entry_index, const void *value)
template<typename OutT, int out_att_components_t>
bool ConvertValue (AttributeValueIndex att_id, OutT *out_val) const
template<typename OutT>
bool ConvertValue (AttributeValueIndex att_id, int8_t out_num_components, OutT *out_val) const
template<typename OutT>
bool ConvertValue (AttributeValueIndex att_index, OutT *out_value) const
bool operator== (const GeometryAttribute &va) const
Type attribute_type () const
void set_attribute_type (Type type)
DataTypeDataType data_type () const
uint8_t num_components () const
bool normalized () const
void set_normalized (bool normalized)
const DataBuffer * buffer () const
int64_t byte_stride () const
int64_t byte_offset () const
void set_byte_offset (int64_t byte_offset)
DataBufferDescriptor buffer_descriptor () const
uint32_t unique_id () const
void set_unique_id (uint32_t id)

Static Public Member Functions

static std::string TypeToString (Type attribute_type)

Protected Member Functions

void ResetBuffer (DataBuffer *buffer, int64_t byte_stride, int64_t byte_offset)

Friends

struct GeometryAttributeHasher

Member Enumeration Documentation

◆ Type

Enumerator
INVALID 
POSITION 
NORMAL 
COLOR 
TEX_COORD 
GENERIC 
NAMED_ATTRIBUTES_COUNT 

Constructor & Destructor Documentation

◆ GeometryAttribute()

draco::GeometryAttribute::GeometryAttribute ( )
Here is the caller graph for this function:

Member Function Documentation

◆ attribute_type()

Type draco::GeometryAttribute::attribute_type ( ) const
inline
Here is the caller graph for this function:

◆ buffer()

const DataBuffer * draco::GeometryAttribute::buffer ( ) const
inline
Here is the caller graph for this function:

◆ buffer_descriptor()

DataBufferDescriptor draco::GeometryAttribute::buffer_descriptor ( ) const
inline

◆ byte_offset()

int64_t draco::GeometryAttribute::byte_offset ( ) const
inline
Here is the caller graph for this function:

◆ byte_stride()

int64_t draco::GeometryAttribute::byte_stride ( ) const
inline
Here is the caller graph for this function:

◆ ConvertValue() [1/3]

template<typename OutT>
bool draco::GeometryAttribute::ConvertValue ( AttributeValueIndex att_id,
int8_t out_num_components,
OutT * out_val ) const
inline

◆ ConvertValue() [2/3]

template<typename OutT, int out_att_components_t>
bool draco::GeometryAttribute::ConvertValue ( AttributeValueIndex att_id,
OutT * out_val ) const
inline
Here is the caller graph for this function:

◆ ConvertValue() [3/3]

template<typename OutT>
bool draco::GeometryAttribute::ConvertValue ( AttributeValueIndex att_index,
OutT * out_value ) const
inline

◆ CopyFrom()

bool draco::GeometryAttribute::CopyFrom ( const GeometryAttribute & src_att)
Here is the caller graph for this function:

◆ data_type()

DataTypeDataType draco::GeometryAttribute::data_type ( ) const
inline
Here is the caller graph for this function:

◆ GetAddress() [1/2]

uint8_t * draco::GeometryAttribute::GetAddress ( AttributeValueIndex att_index)
inline

◆ GetAddress() [2/2]

const uint8_t * draco::GeometryAttribute::GetAddress ( AttributeValueIndex att_index) const
inline
Here is the caller graph for this function:

◆ GetBytePos()

int64_t draco::GeometryAttribute::GetBytePos ( AttributeValueIndex att_index) const
inline
Here is the caller graph for this function:

◆ GetValue() [1/3]

template<typename T, int att_components_t>
std::array< T, att_components_t > draco::GeometryAttribute::GetValue ( AttributeValueIndex att_index) const
inline
Here is the caller graph for this function:

◆ GetValue() [2/3]

template<typename T, int att_components_t>
bool draco::GeometryAttribute::GetValue ( AttributeValueIndex att_index,
std::array< T, att_components_t > * out ) const
inline

◆ GetValue() [3/3]

void draco::GeometryAttribute::GetValue ( AttributeValueIndex att_index,
void * out_data ) const
inline

◆ Init()

void draco::GeometryAttribute::Init ( GeometryAttribute::Type attribute_type,
DataBuffer * buffer,
uint8_t num_components,
DataTypeDataType data_type,
bool normalized,
int64_t byte_stride,
int64_t byte_offset )
Here is the caller graph for this function:

◆ IsAddressValid()

bool draco::GeometryAttribute::IsAddressValid ( const uint8_t * address) const
inline

◆ IsValid()

bool draco::GeometryAttribute::IsValid ( ) const
inline
Here is the caller graph for this function:

◆ normalized()

bool draco::GeometryAttribute::normalized ( ) const
inline
Here is the caller graph for this function:

◆ num_components()

uint8_t draco::GeometryAttribute::num_components ( ) const
inline
Here is the caller graph for this function:

◆ operator==()

bool draco::GeometryAttribute::operator== ( const GeometryAttribute & va) const

◆ ResetBuffer()

void draco::GeometryAttribute::ResetBuffer ( DataBuffer * buffer,
int64_t byte_stride,
int64_t byte_offset )
protected
Here is the caller graph for this function:

◆ set_attribute_type()

void draco::GeometryAttribute::set_attribute_type ( Type type)
inline

◆ set_byte_offset()

void draco::GeometryAttribute::set_byte_offset ( int64_t byte_offset)
inline

◆ set_normalized()

void draco::GeometryAttribute::set_normalized ( bool normalized)
inline

◆ set_unique_id()

void draco::GeometryAttribute::set_unique_id ( uint32_t id)
inline
Here is the caller graph for this function:

◆ SetAttributeValue()

void draco::GeometryAttribute::SetAttributeValue ( AttributeValueIndex entry_index,
const void * value )
inline
Here is the caller graph for this function:

◆ TypeToString()

std::string draco::GeometryAttribute::TypeToString ( Type attribute_type)
inlinestatic

◆ unique_id()

uint32_t draco::GeometryAttribute::unique_id ( ) const
inline
Here is the caller graph for this function:

◆ GeometryAttributeHasher

friend struct GeometryAttributeHasher
friend

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