Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends

sp::video::VertexFormat Class Reference

This is the vertex format class which specifies how vertices are stored on the VRAM. More...

#include <spVertexFormat.hpp>

Inheritance diagram for sp::video::VertexFormat:
sp::video::VertexFormatDefault sp::video::VertexFormatExtended sp::video::VertexFormatFull sp::video::VertexFormatReduced sp::video::VertexFormatUniversal

List of all members.

Public Member Functions

virtual ~VertexFormat ()
io::stringc getIdentifier () const
 Returns the identifier (e.g. "vertex format 'MyVertexFormat'" or "anonymous vertex format").
virtual u32 getFormatSize () const
 Returns the size in bytes of this vertex format.
s32 getFlags () const
 Returns the vertex format flags.
void setName (const io::stringc &Name)
io::stringc getName () const
const SVertexAttributegetCoord () const
const SVertexAttributegetColor () const
const SVertexAttributegetNormal () const
const SVertexAttributegetBinormal () const
const SVertexAttributegetTangent () const
const SVertexAttributegetFogCoord () const
const std::vector
< SVertexAttribute > & 
getTexCoords () const
const std::vector
< SVertexAttribute > & 
getUniversals () const

Static Public Member Functions

static s32 getDataTypeSize (const ERendererDataTypes Type)
 Returns the size in bytes of the specified data type.

Protected Member Functions

 VertexFormat ()
 VertexFormat (const io::stringc &Name, s32 Flags)
virtual void getFormatSize (u32 &Size) const
void addComponentFormatSize (u32 &Size, const SVertexAttribute &Attrib) const
void constructComponent (const EVertexFormatFlags Type, SVertexAttribute &Attrib, s32 &Offset, s32 MinSize, s32 MaxSize)
virtual void constructFormat ()
void addFlag (const EVertexFormatFlags Flag)
void removeFlag (const EVertexFormatFlags Flag)

Protected Attributes

s32 Flags_
io::stringc Name_
SVertexAttribute Coord_
SVertexAttribute Color_
SVertexAttribute Normal_
SVertexAttribute Binormal_
SVertexAttribute Tangent_
SVertexAttribute FogCoord_
std::vector< SVertexAttributeTexCoords_
std::vector< SVertexAttributeUniversals_
void * InputLayout_

Friends

class Direct3D11RenderSystem
class Direct3D11Shader

Detailed Description

This is the vertex format class which specifies how vertices are stored on the VRAM.


Constructor & Destructor Documentation

sp::video::VertexFormat::~VertexFormat (  )  [virtual]
sp::video::VertexFormat::VertexFormat (  )  [protected]
sp::video::VertexFormat::VertexFormat ( const io::stringc Name,
s32  Flags 
) [protected]

Member Function Documentation

void sp::video::VertexFormat::addComponentFormatSize ( u32 Size,
const SVertexAttribute Attrib 
) const [protected]
void sp::video::VertexFormat::addFlag ( const EVertexFormatFlags  Flag  )  [inline, protected]
void sp::video::VertexFormat::constructComponent ( const EVertexFormatFlags  Type,
SVertexAttribute Attrib,
s32 Offset,
s32  MinSize,
s32  MaxSize 
) [protected]
void sp::video::VertexFormat::constructFormat (  )  [protected, virtual]
const SVertexAttribute& sp::video::VertexFormat::getBinormal (  )  const [inline]
const SVertexAttribute& sp::video::VertexFormat::getColor (  )  const [inline]
const SVertexAttribute& sp::video::VertexFormat::getCoord (  )  const [inline]
s32 sp::video::VertexFormat::getDataTypeSize ( const ERendererDataTypes  Type  )  [static]

Returns the size in bytes of the specified data type.

s32 sp::video::VertexFormat::getFlags (  )  const [inline]

Returns the vertex format flags.

const SVertexAttribute& sp::video::VertexFormat::getFogCoord (  )  const [inline]
void sp::video::VertexFormat::getFormatSize ( u32 Size  )  const [protected, virtual]
u32 sp::video::VertexFormat::getFormatSize (  )  const [virtual]
io::stringc sp::video::VertexFormat::getIdentifier (  )  const

Returns the identifier (e.g. "vertex format 'MyVertexFormat'" or "anonymous vertex format").

io::stringc sp::video::VertexFormat::getName (  )  const [inline]
const SVertexAttribute& sp::video::VertexFormat::getNormal (  )  const [inline]
const SVertexAttribute& sp::video::VertexFormat::getTangent (  )  const [inline]
const std::vector<SVertexAttribute>& sp::video::VertexFormat::getTexCoords (  )  const [inline]
const std::vector<SVertexAttribute>& sp::video::VertexFormat::getUniversals (  )  const [inline]
void sp::video::VertexFormat::removeFlag ( const EVertexFormatFlags  Flag  )  [inline, protected]
void sp::video::VertexFormat::setName ( const io::stringc Name  )  [inline]

Friends And Related Function Documentation

friend class Direct3D11RenderSystem [friend]
friend class Direct3D11Shader [friend]

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines