# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CVertexBuffer Class Reference

<Class description>. More...

#include <vertex_buffer.h>

Inheritance diagram for NL3D::CVertexBuffer

Inheritance graph
[legend]
Collaboration diagram for NL3D::CVertexBuffer:

Collaboration graph
[legend]
List of all members.

Public Methods

uint getTouchFlags () const
void resetTouchFlags ()
 CVertexBuffer (void)
 CVertexBuffer (const CVertexBuffer &vb)
 ~CVertexBuffer (void)
CVertexBuffer& operator= (const CVertexBuffer &vb)
bool setVertexFormat (uint32 Flags)
 Setup the vertex format. Do it before any other method. More...

uint32 getVertexFormat (void)
uint8 getVertexSize (void)
void reserve (uint32 nVerts)
 reserve space for nVerts vertices. You are allowed to write your vertices on this space. More...

uint32 capacity ()
 Return the number of vertices reserved. More...

void setNumVertices (uint32 n)
 Set the number of active vertices. It enlarge capacity, if needed. More...

uint32 getNumVertices (void)
 Get the number of active vertices. More...

void setVertexCoord (uint idx, float x, float y, float z)
void setVertexCoord (uint idx, const CVector &v)
void setNormalCoord (uint idx, const CVector &v)
void setTexCoord (uint idx, uint8 stage, float u, float v)
void setTexCoord (uint idx, uint8 stage, const CUV &uv)
void setColor (uint idx, CRGBA rgba)
void setSpecular (uint idx, CRGBA rgba)
void setWeight (uint idx, uint8 wgt, float w)
void setPaletteSkin (uint idx, CPaletteSkin ps)
sint getNormalOff () const
sint getTexCoordOff (uint8 stage=0) const
sint getColorOff () const
sint getSpecularOff () const
sint getWeightOff (sint wgt) const
 NB: it is ensured that WeightOff(i)==WeightOff(0)+i*sizeof(float). More...

sint getPaletteSkinOff () const
void* getVertexCoordPointer (uint idx=0)
void* getNormalCoordPointer (uint idx=0)
void* getTexCoordPointer (uint idx=0, uint8 stage=0)
void* getColorPointer (uint idx=0)
void* getSpecularPointer (uint idx=0)
void* getWeightPointer (uint idx=0, uint8 wgt=0)
void* getPaletteSkinPointer (uint idx=0)
void serial (NLMISC::IStream &f)

Public Attributes

CRefPtr<IVBDrvInfosDrvInfos

Private Attributes

uint32 _Flags
uint8 _VertexSize
uint32 _NbVerts
uint32 _Capacity
std::vector<uint8_Verts
uint _WOff [IDRV_VF_MAXW]
uint _NormalOff
uint _RGBAOff
uint _SpecularOff
uint _UVOff [IDRV_VF_MAXSTAGES]
uint _PaletteSkinOff
uint _Touch

Detailed Description

<Class description>.

Definition at line 119 of file vertex_buffer.h.


Constructor & Destructor Documentation

NL3D::CVertexBuffer::CVertexBuffer ( void )
 

Definition at line 37 of file vertex_buffer.cpp.

NL3D::CVertexBuffer::CVertexBuffer ( const CVertexBuffer & vb )
 

Definition at line 47 of file vertex_buffer.cpp.

NL3D::CVertexBuffer::~CVertexBuffer ( void )
 

Definition at line 56 of file vertex_buffer.cpp.


Member Function Documentation

uint32 NL3D::CVertexBuffer::capacity ( ) [inline]
 

Return the number of vertices reserved.

Definition at line 162 of file vertex_buffer.h.

sint NL3D::CVertexBuffer::getColorOff ( ) const [inline]
 

Definition at line 185 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getColorPointer ( uint idx = 0 )
 

Definition at line 197 of file vertex_buffer.cpp.

void * NL3D::CVertexBuffer::getNormalCoordPointer ( uint idx = 0 )
 

Definition at line 183 of file vertex_buffer.cpp.

sint NL3D::CVertexBuffer::getNormalOff ( ) const [inline]
 

Definition at line 183 of file vertex_buffer.h.

uint32 NL3D::CVertexBuffer::getNumVertices ( void ) [inline]
 

Get the number of active vertices.

Definition at line 166 of file vertex_buffer.h.

sint NL3D::CVertexBuffer::getPaletteSkinOff ( ) const [inline]
 

Definition at line 189 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getPaletteSkinPointer ( uint idx = 0 )
 

Definition at line 255 of file vertex_buffer.cpp.

sint NL3D::CVertexBuffer::getSpecularOff ( ) const [inline]
 

Definition at line 186 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getSpecularPointer ( uint idx = 0 )
 

Definition at line 211 of file vertex_buffer.cpp.

sint NL3D::CVertexBuffer::getTexCoordOff ( uint8 stage = 0 ) const [inline]
 

Definition at line 184 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getTexCoordPointer ( uint idx = 0,
uint8 stage = 0 )
 

Definition at line 225 of file vertex_buffer.cpp.

uint NL3D::CVertexBuffer::getTouchFlags ( ) const [inline]
 

Definition at line 141 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getVertexCoordPointer ( uint idx = 0 )
 

Definition at line 174 of file vertex_buffer.cpp.

uint32 NL3D::CVertexBuffer::getVertexFormat ( void ) [inline]
 

Definition at line 156 of file vertex_buffer.h.

uint8 NL3D::CVertexBuffer::getVertexSize ( void ) [inline]
 

Definition at line 157 of file vertex_buffer.h.

sint NL3D::CVertexBuffer::getWeightOff ( sint wgt ) const [inline]
 

NB: it is ensured that WeightOff(i)==WeightOff(0)+i*sizeof(float).

Definition at line 188 of file vertex_buffer.h.

void * NL3D::CVertexBuffer::getWeightPointer ( uint idx = 0,
uint8 wgt = 0 )
 

Definition at line 240 of file vertex_buffer.cpp.

CVertexBuffer & NL3D::CVertexBuffer::operator= ( const CVertexBuffer & vb )
 

Definition at line 62 of file vertex_buffer.cpp.

void NL3D::CVertexBuffer::reserve ( uint32 n )
 

reserve space for nVerts vertices. You are allowed to write your vertices on this space.

Definition at line 153 of file vertex_buffer.cpp.

void NL3D::CVertexBuffer::resetTouchFlags ( ) [inline]
 

Definition at line 142 of file vertex_buffer.h.

void NL3D::CVertexBuffer::serial ( NLMISC::IStream & f )
 

Definition at line 273 of file vertex_buffer.cpp.

void NL3D::CVertexBuffer::setColor ( uint idx,
CRGBA rgba ) [inline]
 

Definition at line 250 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setNormalCoord ( uint idx,
const CVector & v ) [inline]
 

Definition at line 237 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setNumVertices ( uint32 n )
 

Set the number of active vertices. It enlarge capacity, if needed.

Definition at line 159 of file vertex_buffer.cpp.

void NL3D::CVertexBuffer::setPaletteSkin ( uint idx,
CPaletteSkin ps ) [inline]
 

Definition at line 331 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setSpecular ( uint idx,
CRGBA rgba ) [inline]
 

Definition at line 265 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setTexCoord ( uint idx,
uint8 stage,
const CUV & uv ) [inline]
 

Definition at line 298 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setTexCoord ( uint idx,
uint8 stage,
float u,
float v ) [inline]
 

Definition at line 280 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setVertexCoord ( uint idx,
const CVector & v ) [inline]
 

Definition at line 226 of file vertex_buffer.h.

void NL3D::CVertexBuffer::setVertexCoord ( uint idx,
float x,
float y,
float z ) [inline]
 

Definition at line 210 of file vertex_buffer.h.

bool NL3D::CVertexBuffer::setVertexFormat ( uint32 flags )
 

Setup the vertex format. Do it before any other method.

Definition at line 90 of file vertex_buffer.cpp.

void NL3D::CVertexBuffer::setWeight ( uint idx,
uint8 wgt,
float w ) [inline]
 

Definition at line 315 of file vertex_buffer.h.


Member Data Documentation

CRefPtr< IVBDrvInfos > NL3D::CVertexBuffer::DrvInfos
 

Definition at line 140 of file vertex_buffer.h.

uint32 NL3D::CVertexBuffer::_Capacity [private]
 

Definition at line 125 of file vertex_buffer.h.

uint32 NL3D::CVertexBuffer::_Flags [private]
 

Definition at line 122 of file vertex_buffer.h.

uint32 NL3D::CVertexBuffer::_NbVerts [private]
 

Definition at line 124 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_NormalOff [private]
 

Definition at line 129 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_PaletteSkinOff [private]
 

Definition at line 133 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_RGBAOff [private]
 

Definition at line 130 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_SpecularOff [private]
 

Definition at line 131 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_Touch [private]
 

Definition at line 135 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_UVOff[IDRV_VF_MAXSTAGES] [private]
 

Definition at line 132 of file vertex_buffer.h.

uint8 NL3D::CVertexBuffer::_VertexSize [private]
 

Definition at line 123 of file vertex_buffer.h.

std::vector< uint8 > NL3D::CVertexBuffer::_Verts [private]
 

Definition at line 126 of file vertex_buffer.h.

uint NL3D::CVertexBuffer::_WOff[IDRV_VF_MAXW] [private]
 

Definition at line 128 of file vertex_buffer.h.


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