/* Normal Vectors */
static GLdouble cube_n[CUBE_NUM_FACES][3] =
{
+ { 0.0, 0.0, 1.0},
{ 1.0, 0.0, 0.0},
{ 0.0, 1.0, 0.0},
- { 0.0, 0.0, 1.0},
{-1.0, 0.0, 0.0},
{ 0.0,-1.0, 0.0},
{ 0.0, 0.0,-1.0}
#define TETR_VERT_ELEM_PER_TETR TETR_VERT_PER_TETR*3
/* Vertex Coordinates */
-static GLdouble tet_r[TETR_NUM_VERT][TETR_NUM_VERT_PER_FACE] =
+static GLdouble tet_r[TETR_NUM_VERT][3] =
{
{ 1.0, 0.0, 0.0 },
{ -0.333333333333, 0.942809041582, 0.0 },
static void fghCube( GLdouble dSize, GLboolean useWireMode )
{
if (!cubeCached)
+ {
fghCubeGenerate();
+ cubeCached = TRUE;
+ }
if (dSize!=1.)
{
static void fghTetrahedron( GLboolean useWireMode )
{
if (!tetrCached)
+ {
fghTetrahedronGenerate();
+ tetrCached = TRUE;
+ }
fghDrawGeometry(GL_TRIANGLES,tetr_verts,tetr_norms,TETR_VERT_PER_TETR,useWireMode);
}