Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

VertexDeclaration Class Reference

#include <vertexdecl.h>

Collaboration diagram for VertexDeclaration:

Collaboration graph
[legend]
List of all members.

Detailed Description

Complete declaration of a vertex Complete declaration of a vertex format. All elements must be declared in offset order.

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 VertexDeclaration (unsigned int uiNumElements)
 VertexDeclaration (const VertexDeclaration &rkDeclaration)
virtual ~VertexDeclaration ()
VertexElementGetElement (unsigned int uiType=VertexElement::UNKNOWNTYPE, unsigned int uiUsage=VertexElement::UNKNOWNUSAGE)
const VertexElementGetElement (unsigned int uiType=VertexElement::UNKNOWNTYPE, unsigned int uiUsage=VertexElement::UNKNOWNUSAGE) const
unsigned int GetVertexSize () const
virtual VertexDeclarationDuplicate () const
VertexDeclarationoperator= (const VertexDeclaration &rkDeclaration)
bool operator== (const VertexDeclaration &rkDeclaration) const
void Interpolate (unsigned char *pucFrom, unsigned char *pucTo, unsigned char *pucDest, float fFactor) const
virtual void InterpolateArray (unsigned char *pucFrom, unsigned char *pucTo, unsigned char *pucDest, float fFactor, unsigned int uiNumVertices) const

Public Attributes

VertexElementm_pkElements
unsigned int m_uiNumElements


Constructor & Destructor Documentation

VertexDeclaration unsigned int  uiNumElements  ) 
 

Parameters:
uiNumElements Number of elements in format declaration

VertexDeclaration const VertexDeclaration rkDeclaration  ) 
 

Parameters:
rkDeclaration Reference declaration object to copy data from

virtual ~VertexDeclaration  )  [virtual]
 


Member Function Documentation

VertexElement* GetElement unsigned int  uiType = VertexElement::UNKNOWNTYPE,
unsigned int  uiUsage = VertexElement::UNKNOWNUSAGE
 

Get first matching element of specified type

Parameters:
uiType Element type
uiUsage Element usage, or UNKNOWN for matching any usage
Returns:
First matching element, or null if no match

const VertexElement* GetElement unsigned int  uiType = VertexElement::UNKNOWNTYPE,
unsigned int  uiUsage = VertexElement::UNKNOWNUSAGE
const
 

Get first matching element of specified type

Parameters:
uiType Element type
uiUsage Element usage, or UNKNOWN for matching any usage
Returns:
First matching element, or null if no match

unsigned int GetVertexSize  )  const
 

Get size of a vertex with this format declaration

Returns:
Size of a vertex

virtual VertexDeclaration* Duplicate  )  const [virtual]
 

Duplicate vertex format declaration object

Returns:
New object that is copy of this object

VertexDeclaration& operator= const VertexDeclaration rkDeclaration  ) 
 

Parameters:
rkDeclaration Reference declaration object to copy data from

bool operator== const VertexDeclaration rkDeclaration  )  const
 

Parameters:
rkDeclaration Reference declaration object to compare with
Returns:
true if declarations are equal

void Interpolate unsigned char *  pucFrom,
unsigned char *  pucTo,
unsigned char *  pucDest,
float  fFactor
const [inline]
 

Interpolate between two vertices of generic type

Parameters:
pucFrom Pointer to first source vertex
pucTo Pointer to second source vertex
pucDest Pointer to destination vertex receiving interpolated data
fFactor Interpolation factor

virtual void InterpolateArray unsigned char *  pucFrom,
unsigned char *  pucTo,
unsigned char *  pucDest,
float  fFactor,
unsigned int  uiNumVertices
const [virtual]
 

Interpolate between two vertex buffers of generic type

Parameters:
pucFrom Pointer to first source vertex buffer
pucTo Pointer to second source vertex buffer
pucDest Pointer to destination vertex buffer receiving interpolated data
fFactor Interpolation factor
uiNumVertices Number of vertices to interpolate


Member Data Documentation

VertexElement* m_pkElements
 

Vertex declarations

unsigned int m_uiNumElements
 

Number of elements


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:16 2004 for NeoEngine by doxygen 1.3.5