Nebula
Loading...
Searching...
No Matches
CoreGraphics::VertexComponent Class Reference

#include <vertexcomponent.h>

Detailed Description

Describes a single vertex component in a vertex layout description.

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  IndexName {
  Position = 0 , Normal = 1 , TexCoord1 = 2 , Tangent = 3 ,
  Binormal = 4 , Color = 5 , TexCoord2 = 6 , SkinWeights = 7 ,
  SkinJIndices = 8 , TexCoord3 = 9 , TexCoord4 = 10 , Invalid
}
 
enum  StrideType { PerVertex , PerInstance }
 stride type tells if the compoent should be per-instance or per-vertex More...
 

Public Member Functions

 VertexComponent ()
 default constructor
 
 VertexComponent (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 

◆ IndexName

Enumerator
Position 
Normal 
TexCoord1 
Tangent 
Binormal 
Color 
TexCoord2 
SkinWeights 
SkinJIndices 
TexCoord3 
TexCoord4 
Invalid 

◆ StrideType

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

Enumerator
PerVertex 
PerInstance 

Constructor & Destructor Documentation

◆ VertexComponent() [1/2]

CoreGraphics::VertexComponent::VertexComponent ( )
inline

default constructor

◆ VertexComponent() [2/2]

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

constructor

Member Function Documentation

◆ FormatToSignature()

Util::String CoreGraphics::VertexComponent::FormatToSignature ( Format f)
inlinestatic

convert format to signature

◆ FormatToString()

Util::String CoreGraphics::VertexComponent::FormatToString ( Format f)
inlinestatic

convert format to string

◆ GetByteOffset()

IndexT CoreGraphics::VertexComponent::GetByteOffset ( ) const
inline

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

◆ GetByteSize()

SizeT CoreGraphics::VertexComponent::GetByteSize ( ) const
inline

get the byte size of the vertex component

◆ GetFormat()

VertexComponent::Format CoreGraphics::VertexComponent::GetFormat ( ) const
inline

get vertex component format

◆ GetIndex()

IndexT CoreGraphics::VertexComponent::GetIndex ( ) const
inline

get semantic index

◆ GetSignature()

Util::String CoreGraphics::VertexComponent::GetSignature ( ) const
inline

get a unique signature of the vertex component

◆ GetStreamIndex()

IndexT CoreGraphics::VertexComponent::GetStreamIndex ( ) const
inline

get stream index

◆ GetStride()

SizeT CoreGraphics::VertexComponent::GetStride ( ) const
inline

get stride between instances

◆ GetStrideType()

VertexComponent::StrideType CoreGraphics::VertexComponent::GetStrideType ( ) const
inline

get stride type

◆ SetByteOffset()

void CoreGraphics::VertexComponent::SetByteOffset ( IndexT offset)
inlineprotected

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

◆ StringToFormat()

VertexComponent::Format CoreGraphics::VertexComponent::StringToFormat ( const Util::String & str)
inlinestatic

convert string to format

Friends And Related Symbol Documentation

◆ CoreGraphics::CreateVertexLayout

Member Data Documentation

◆ byteOffset

IndexT CoreGraphics::VertexComponent::byteOffset
protected

◆ format

Format CoreGraphics::VertexComponent::format
protected

◆ index

IndexT CoreGraphics::VertexComponent::index
protected

◆ streamIndex

IndexT CoreGraphics::VertexComponent::streamIndex
protected

◆ stride

SizeT CoreGraphics::VertexComponent::stride
protected

◆ strideType

StrideType CoreGraphics::VertexComponent::strideType
protected

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