Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgVArray Class Reference

A class supporting vertex array buffers. More...

#include <ddgvarr.h>

List of all members.


Public Members

enum  ddgBufType { dummy, point, line, triangle, quad }
Enumeration of buffer types.

 ddgVArray ( ddgBufType type = triangle)
Create a object but don't allocate any memory.

 ~ddgVArray ( void )
Destructor free all memory.

bool init (void )
Initialize the vector Buffer object and allocate buffers if size is set.

void reset (void)
Reset the buffers, Must be called before filling buffer.

void size (unsigned int datasize, unsigned int indexsize)
Initial buffer size to allocate. Must be called before init.

unsigned int size (void)
Return the number of verticex indices in the buffer.

unsigned int num (void)
Return the number of shared vertices in the buffer.

void renderMode ( bool t = true, bool n = true, bool c = true)
Set the rendering mode.

void compactTextureCoords ( bool c )
Activate the use of unsigned chars as texture coordinates.

bool colorOn (void)
Is color active.

bool textureOn (void)
Is texture active.

bool normalOn (void)
Is normal active.

unsigned int inum (void)
How many items are in the stack.

ddgBufType type (void)
What type of primitive are we managing.

ddgVBIndex pushVTNC (ddgVector3 *p, ddgVector2 *t, ddgVector3 *n, ddgColor4 *c)
Push a vertex into the buffer.

ddgVBIndex pushVTN (ddgVector3 *p, ddgVector2 *t, ddgVector3 *n)
Push a vertex into the buffer.

ddgVBIndex pushVT (ddgVector3 *p, ddgVector2 *t)
Push a vertex into the buffer.

ddgVBIndex pushVT (ddgVector3 *p, ddgTexCoord2 *t)
Push a vertex into the buffer.

ddgVBIndex pushVC (ddgVector3 *p, ddgColor4 *c)
Push a vertex into the buffer.

ddgVBIndex pushV (ddgVector3 *p)
Push a vertex into the buffer.

void pushTriangle ( ddgVBIndex i1, ddgVBIndex i2, ddgVBIndex i3 )
Push an index into the buffer.

void pushQuad ( ddgVBIndex i1, ddgVBIndex i2, ddgVBIndex i3, ddgVBIndex i4 )
Push an index into the buffer.

void pushLine ( ddgVBIndex i1, ddgVBIndex i2 )
Push an index into the buffer.

void pushPoint ( ddgVBIndex i1 )
Push an index into the buffer.

void sort (void)
Depth Sort the data in the buffer.

ddgVBIndex* ibuf
Index buffer.

ddgVector3vbuf
Vertex buffer.

ddgVector2tbuf
Texture coord buffer.

ddgTexCoord2* tibuf
Integer texture coord buffer.

ddgColor4cbuf
Color buffer.

ddgVector3nbuf
Normal coord buffer.


Detailed Description

A class supporting vertex array buffers.

It can allocate memory and supports pushing data into buffers in various convenient configurations. Entry 0 is unused.


The documentation for this class was generated from the following files:
Generated at Sun Sep 17 19:27:58 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999