Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cMeshVertsV Class Reference

#include <cMesh.h>

Public Member Functions

 cMeshVertsV (size_t nVertStride=sizeof(cVector3f))
 
size_t get_VertStride () const
 
ITERATE_t get_VertQty () const
 
cVector3fref_Vert (ITERATE_t i)
 
const cVector3fget_Vert (ITERATE_t i) const
 
cVector3fget_VertPtr ()
 
void SetVertQty (ITERATE_t dwQty, size_t nVertStride)
 
void FreeVerts ()
 
void AddVert (const void *pVert)
 

Protected Attributes

size_t m_nVertStride
 Size of each vertex blob. ASSUME (m_nVertStride >= sizeof(cVector3f)) More...
 
ITERATE_t m_nVertices
 Quantity of (m_nVertStride sized) vertex elements allocated. COUNT_t. More...
 
cHeapBlock m_Vertices
 cVector3f based flexible vertex format. More...
 

Detailed Description

Arbitrary stride sized vertex array. Flexible vertex format. (for a mesh) extra data for each vertex may include normals, tangents, UV data, shader data, etc

Note
ASSUME the first element of vertex data is always a cVector3f Similar to cDXMeshVertex

Constructor & Destructor Documentation

◆ cMeshVertsV()

Gray3D::cMeshVertsV::cMeshVertsV ( size_t  nVertStride = sizeof(cVector3f))
inline

Member Function Documentation

◆ AddVert()

void Gray3D::cMeshVertsV::AddVert ( const void *  pVert)
inline

Add a new vertex of m_nVertStride size.

◆ FreeVerts()

void Gray3D::cMeshVertsV::FreeVerts ( )
inline

◆ get_Vert()

const cVector3f& Gray3D::cMeshVertsV::get_Vert ( ITERATE_t  i) const
inline

Get the vertex vector portion of the vertex block. cast this to the true vertex structure type.

◆ get_VertPtr()

cVector3f* Gray3D::cMeshVertsV::get_VertPtr ( )
inline

◆ get_VertQty()

ITERATE_t Gray3D::cMeshVertsV::get_VertQty ( ) const
inline

◆ get_VertStride()

size_t Gray3D::cMeshVertsV::get_VertStride ( ) const
inline

size in bytes.

◆ ref_Vert()

cVector3f& Gray3D::cMeshVertsV::ref_Vert ( ITERATE_t  i)
inline

Reference the vertex vector portion of the vertex block.

Note
ASSUME the first element of vertex data is always a cVector3f

◆ SetVertQty()

void Gray3D::cMeshVertsV::SetVertQty ( ITERATE_t  dwQty,
size_t  nVertStride 
)
inline

Create space for un-init vertices. if m_nVertStride changes then any previous data is now junk.

Member Data Documentation

◆ m_nVertices

ITERATE_t Gray3D::cMeshVertsV::m_nVertices
protected

Quantity of (m_nVertStride sized) vertex elements allocated. COUNT_t.

◆ m_nVertStride

size_t Gray3D::cMeshVertsV::m_nVertStride
protected

Size of each vertex blob. ASSUME (m_nVertStride >= sizeof(cVector3f))

◆ m_Vertices

cHeapBlock Gray3D::cMeshVertsV::m_Vertices
protected

cVector3f based flexible vertex format.


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