Nebula
Loading...
Searching...
No Matches
Base::VertexComponentBase Class Reference

#include <vertexcomponentbase.h>

Public Types

enum  Format {
  Float , Float2 , Float3 , Float4 ,
  Half , Half2 , Half3 , Half4 ,
  UInt , UInt2 , UInt3 , UInt4 ,
  Int , Int2 , Int3 , Int4 ,
  Short , Short2 , Short3 , Short4 ,
  UShort , UShort2 , UShort3 , UShort4 ,
  UByte4 , Byte4 , UByte4N , Byte4N ,
  Short2N , Short4N , UShort2N , UShort4N ,
  InvalidFormat
}
 component format More...
 
enum  StrideType { PerVertex , PerInstance }
 stride type tells if the compoent should be per-instance or per-vertex More...
 

Public Member Functions

 VertexComponentBase ()
 default constructor
 
 VertexComponentBase (IndexT slot, Format format, IndexT streamIndex=0, StrideType strideType=PerVertex, SizeT stride=0)
 constructor
 
IndexT GetIndex () const
 get semantic index
 
Format GetFormat () const
 get vertex component format
 
IndexT GetStreamIndex () const
 get stream index
 
SizeT GetByteSize () const
 get the byte size of the vertex component
 
Util::String GetSignature () const
 get a unique signature of the vertex component
 
StrideType GetStrideType () const
 get stride type
 
SizeT GetStride () const
 get stride between instances
 
IndexT GetByteOffset () const
 get the byte offset of this component (only valid when part of a VertexLayout)
 

Static Public Member Functions

static Format StringToFormat (const Util::String &str)
 convert string to format
 
static Util::String FormatToString (Format f)
 convert format to string
 
static Util::String FormatToSignature (Format f)
 convert format to signature
 

Protected Member Functions

void SetByteOffset (IndexT offset)
 set the vertex byte offset (called from VertexLayoutBase::Setup())
 

Protected Attributes

IndexT index
 
Format format
 
StrideType strideType
 
SizeT stride
 
IndexT streamIndex
 
IndexT byteOffset
 

Friends

const CoreGraphics::VertexLayoutId CoreGraphics::CreateVertexLayout (const CoreGraphics::VertexLayoutCreateInfo &info)
 

Member Enumeration Documentation

◆ Format

component format

Enumerator
Float 
Float2 
Float3 
Float4 
Half 
Half2 
Half3 
Half4 
UInt 
UInt2 
UInt3 
UInt4 
Int 
Int2 
Int3 
Int4 
Short 
Short2 
Short3 
Short4 
UShort 
UShort2 
UShort3 
UShort4 
UByte4 
Byte4 
UByte4N 
Byte4N 
Short2N 
Short4N 
UShort2N 
UShort4N 
InvalidFormat 

◆ StrideType

stride type tells if the compoent should be per-instance or per-vertex

Enumerator
PerVertex 
PerInstance 

Constructor & Destructor Documentation

◆ VertexComponentBase() [1/2]

Base::VertexComponentBase::VertexComponentBase ( )
inline

default constructor

◆ VertexComponentBase() [2/2]

Base::VertexComponentBase::VertexComponentBase ( IndexT slot,
Format format,
IndexT streamIndex = 0,
StrideType strideType = PerVertex,
SizeT stride = 0 )
inline

constructor

Member Function Documentation

◆ FormatToSignature()

Util::String Base::VertexComponentBase::FormatToSignature ( Format f)
inlinestatic

convert format to signature

◆ FormatToString()

Util::String Base::VertexComponentBase::FormatToString ( Format f)
inlinestatic

convert format to string

◆ GetByteOffset()

IndexT Base::VertexComponentBase::GetByteOffset ( ) const
inline

get the byte offset of this component (only valid when part of a VertexLayout)

◆ GetByteSize()

SizeT Base::VertexComponentBase::GetByteSize ( ) const
inline

get the byte size of the vertex component

◆ GetFormat()

VertexComponentBase::Format Base::VertexComponentBase::GetFormat ( ) const
inline

get vertex component format

◆ GetIndex()

IndexT Base::VertexComponentBase::GetIndex ( ) const
inline

get semantic index

◆ GetSignature()

Util::String Base::VertexComponentBase::GetSignature ( ) const
inline

get a unique signature of the vertex component

◆ GetStreamIndex()

IndexT Base::VertexComponentBase::GetStreamIndex ( ) const
inline

get stream index

◆ GetStride()

SizeT Base::VertexComponentBase::GetStride ( ) const
inline

get stride between instances

◆ GetStrideType()

VertexComponentBase::StrideType Base::VertexComponentBase::GetStrideType ( ) const
inline

get stride type

◆ SetByteOffset()

void Base::VertexComponentBase::SetByteOffset ( IndexT offset)
inlineprotected

set the vertex byte offset (called from VertexLayoutBase::Setup())

◆ StringToFormat()

VertexComponentBase::Format Base::VertexComponentBase::StringToFormat ( const Util::String & str)
inlinestatic

convert string to format

Friends And Related Symbol Documentation

◆ CoreGraphics::CreateVertexLayout

Member Data Documentation

◆ byteOffset

IndexT Base::VertexComponentBase::byteOffset
protected

◆ format

Format Base::VertexComponentBase::format
protected

◆ index

IndexT Base::VertexComponentBase::index
protected

◆ streamIndex

IndexT Base::VertexComponentBase::streamIndex
protected

◆ stride

SizeT Base::VertexComponentBase::stride
protected

◆ strideType

StrideType Base::VertexComponentBase::strideType
protected

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