21 #ifndef _GFXLIB_STRUCT
22 #define _GFXLIB_STRUCT
27 #define GFXBOOL unsigned char
38 #define USE_DISPLAY_LISTS
39 const int HAS_INDEX =
sizeof (
unsigned char)|
sizeof (
unsigned short)|
sizeof (
unsigned int);
72 GFXVertex(
const QVector &vert,
const Vector &norm,
float s,
float t )
78 GFXVertex(
const Vector &vert,
const Vector &norm,
float s,
float t )
125 return Vector(
x,
y,
z );
129 return *( (Vector*) &
x );
133 return Vector(
i,
j,
k );
137 return Vector(
x,
y,
z );
141 return Vector(
tx,
ty,
tz );
189 return GFXColor( ( (
r < 0) ? 0 : ( (
r > 1) ? 1 :
r ) ), ( (
g < 0) ? 0 : ( (
g > 1) ? 1 :
g ) ),
190 ( (
b < 0) ? 0 : ( (
b > 1) ? 1 :
b ) ), ( (
a < 0) ? 0 : ( (
a > 1) ? 1 :
a ) ) );
248 GFXColorVertex(
float x,
float y,
float z,
float i,
float j,
float k,
float r,
float g,
float b,
float a,
float s,
float t )
301 return Vector(
i,
j,
k );
305 return Vector(
x,
y,
z );
321 return Vector(
tx,
ty,
tz );
393 Vector
getPosition()
const {
return Vector(vect[0], vect[1], vect[2]); }
458 int *quadassignments;
548 unsigned int *indices );
562 bool Mutable =
false,
563 unsigned int *
index = 0 )
565 Init( &poly, numVertices, vertices, 0, 1, &numindices, Mutable,
index );
573 bool Mutable =
false,
574 unsigned int *
index = 0 )
576 Init( poly, numVertices, vertices, 0, numlists, offsets, Mutable,
index );
583 bool Mutable =
false,
584 unsigned int *
index = 0 )
586 Init( &poly, numVertices, 0, colors, 1, &numindices, Mutable,
index );
594 bool Mutable =
false,
595 unsigned int *
index = 0 )
597 Init( poly, numVertices, 0, colors, numlists, offsets, Mutable,
index );
605 unsigned int GetIndex(
int offset )
const;
615 virtual VDAT *
Map(
bool read,
bool write );
620 virtual void EndMutate(
int newsize = 0 );
653 virtual void EndMutate(
int newsize = 0 );