Made a few global arrays "static", avoiding namespace pollution. The only
externally visible symbols should either be from the GLUT API ("glutXXX") or internal freeglut entities ("fgYYY"). Reformatted things a bit on the way. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@671 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
633e3e7179
commit
7648f784f3
@ -1110,3 +1110,8 @@ obscure, though...
|
|||||||
redisplayed *and* it is visible. Otherwise we won't redraw, anyway, and
|
redisplayed *and* it is visible. Otherwise we won't redraw, anyway, and
|
||||||
immediately discover that there's still something to do, etc. etc., leading
|
immediately discover that there's still something to do, etc. etc., leading
|
||||||
to 100% CPU load.
|
to 100% CPU load.
|
||||||
|
|
||||||
|
(289) Made a few global arrays "static", avoiding namespace pollution. The
|
||||||
|
only externally visible symbols should either be from the GLUT API
|
||||||
|
("glutXXX") or internal freeglut entities ("fgYYY"). Reformatted things a
|
||||||
|
bit on the way.
|
||||||
|
@ -960,14 +960,43 @@ void FGAPIENTRY glutSolidTetrahedron( void )
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
double icos_r[12][3] = { { 1.0, 0.0, 0.0 },
|
static double icos_r[12][3] = {
|
||||||
{ 0.447213595500, 0.894427191000, 0.0 }, { 0.447213595500, 0.276393202252, 0.850650808354 }, { 0.447213595500, -0.723606797748, 0.525731112119 }, { 0.447213595500, -0.723606797748, -0.525731112119 }, { 0.447213595500, 0.276393202252, -0.850650808354 },
|
{ 1.0, 0.0, 0.0 },
|
||||||
{ -0.447213595500, -0.894427191000, 0.0 }, { -0.447213595500, -0.276393202252, 0.850650808354 }, { -0.447213595500, 0.723606797748, 0.525731112119 }, { -0.447213595500, 0.723606797748, -0.525731112119 }, { -0.447213595500, -0.276393202252, -0.850650808354 },
|
{ 0.447213595500, 0.894427191000, 0.0 },
|
||||||
{ -1.0, 0.0, 0.0 } } ;
|
{ 0.447213595500, 0.276393202252, 0.850650808354 },
|
||||||
int icos_v [20][3] = { { 0, 1, 2 }, { 0, 2, 3 }, { 0, 3, 4 }, { 0, 4, 5 }, { 0, 5, 1 },
|
{ 0.447213595500, -0.723606797748, 0.525731112119 },
|
||||||
{ 1, 8, 2 }, { 2, 7, 3 }, { 3, 6, 4 }, { 4, 10, 5 }, { 5, 9, 1 },
|
{ 0.447213595500, -0.723606797748, -0.525731112119 },
|
||||||
{ 1, 9, 8 }, { 2, 8, 7 }, { 3, 7, 6 }, { 4, 6, 10 }, { 5, 10, 9 },
|
{ 0.447213595500, 0.276393202252, -0.850650808354 },
|
||||||
{ 11, 9, 10 }, { 11, 8, 9 }, { 11, 7, 8 }, { 11, 6, 7 }, { 11, 10, 6 } } ;
|
{ -0.447213595500, -0.894427191000, 0.0 },
|
||||||
|
{ -0.447213595500, -0.276393202252, 0.850650808354 },
|
||||||
|
{ -0.447213595500, 0.723606797748, 0.525731112119 },
|
||||||
|
{ -0.447213595500, 0.723606797748, -0.525731112119 },
|
||||||
|
{ -0.447213595500, -0.276393202252, -0.850650808354 },
|
||||||
|
{ -1.0, 0.0, 0.0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
static int icos_v [20][3] = {
|
||||||
|
{ 0, 1, 2 },
|
||||||
|
{ 0, 2, 3 },
|
||||||
|
{ 0, 3, 4 },
|
||||||
|
{ 0, 4, 5 },
|
||||||
|
{ 0, 5, 1 },
|
||||||
|
{ 1, 8, 2 },
|
||||||
|
{ 2, 7, 3 },
|
||||||
|
{ 3, 6, 4 },
|
||||||
|
{ 4, 10, 5 },
|
||||||
|
{ 5, 9, 1 },
|
||||||
|
{ 1, 9, 8 },
|
||||||
|
{ 2, 8, 7 },
|
||||||
|
{ 3, 7, 6 },
|
||||||
|
{ 4, 6, 10 },
|
||||||
|
{ 5, 10, 9 },
|
||||||
|
{ 11, 9, 10 },
|
||||||
|
{ 11, 8, 9 },
|
||||||
|
{ 11, 7, 8 },
|
||||||
|
{ 11, 6, 7 },
|
||||||
|
{ 11, 10, 6 }
|
||||||
|
};
|
||||||
|
|
||||||
void FGAPIENTRY glutWireIcosahedron( void )
|
void FGAPIENTRY glutWireIcosahedron( void )
|
||||||
{
|
{
|
||||||
@ -1018,18 +1047,51 @@ void FGAPIENTRY glutSolidIcosahedron( void )
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
double rdod_r[14][3] = { { 0.0, 0.0, 1.0 },
|
static double rdod_r[14][3] = {
|
||||||
{ 0.707106781187, 0.000000000000, 0.5 }, { 0.000000000000, 0.707106781187, 0.5 }, { -0.707106781187, 0.000000000000, 0.5 }, { 0.000000000000, -0.707106781187, 0.5 },
|
{ 0.0, 0.0, 1.0 },
|
||||||
{ 0.707106781187, 0.707106781187, 0.0 }, { -0.707106781187, 0.707106781187, 0.0 }, { -0.707106781187, -0.707106781187, 0.0 }, { 0.707106781187, -0.707106781187, 0.0 },
|
{ 0.707106781187, 0.000000000000, 0.5 },
|
||||||
{ 0.707106781187, 0.000000000000, -0.5 }, { 0.000000000000, 0.707106781187, -0.5 }, { -0.707106781187, 0.000000000000, -0.5 }, { 0.000000000000, -0.707106781187, -0.5 },
|
{ 0.000000000000, 0.707106781187, 0.5 },
|
||||||
{ 0.0, 0.0, -1.0 } } ;
|
{ -0.707106781187, 0.000000000000, 0.5 },
|
||||||
int rdod_v [12][4] = { { 0, 1, 5, 2 }, { 0, 2, 6, 3 }, { 0, 3, 7, 4 }, { 0, 4, 8, 1 },
|
{ 0.000000000000, -0.707106781187, 0.5 },
|
||||||
{ 5, 10, 6, 2 }, { 6, 11, 7, 3 }, { 7, 12, 8, 4 }, { 8, 9, 5, 1 },
|
{ 0.707106781187, 0.707106781187, 0.0 },
|
||||||
{ 5, 9, 13, 10 }, { 6, 10, 13, 11 }, { 7, 11, 13, 12 }, { 8, 12, 13, 9 } } ;
|
{ -0.707106781187, 0.707106781187, 0.0 },
|
||||||
double rdod_n[12][3] = {
|
{ -0.707106781187, -0.707106781187, 0.0 },
|
||||||
{ 0.353553390594, 0.353553390594, 0.5 }, { -0.353553390594, 0.353553390594, 0.5 }, { -0.353553390594, -0.353553390594, 0.5 }, { 0.353553390594, -0.353553390594, 0.5 },
|
{ 0.707106781187, -0.707106781187, 0.0 },
|
||||||
{ 0.000000000000, 1.000000000000, 0.0 }, { -1.000000000000, 0.000000000000, 0.0 }, { 0.000000000000, -1.000000000000, 0.0 }, { 1.000000000000, 0.000000000000, 0.0 },
|
{ 0.707106781187, 0.000000000000, -0.5 },
|
||||||
{ 0.353553390594, 0.353553390594, -0.5 }, { -0.353553390594, 0.353553390594, -0.5 }, { -0.353553390594, -0.353553390594, -0.5 }, { 0.353553390594, -0.353553390594, -0.5 }
|
{ 0.000000000000, 0.707106781187, -0.5 },
|
||||||
|
{ -0.707106781187, 0.000000000000, -0.5 },
|
||||||
|
{ 0.000000000000, -0.707106781187, -0.5 },
|
||||||
|
{ 0.0, 0.0, -1.0 }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
static int rdod_v [12][4] = {
|
||||||
|
{ 0, 1, 5, 2 },
|
||||||
|
{ 0, 2, 6, 3 },
|
||||||
|
{ 0, 3, 7, 4 },
|
||||||
|
{ 0, 4, 8, 1 },
|
||||||
|
{ 5, 10, 6, 2 },
|
||||||
|
{ 6, 11, 7, 3 },
|
||||||
|
{ 7, 12, 8, 4 },
|
||||||
|
{ 8, 9, 5, 1 },
|
||||||
|
{ 5, 9, 13, 10 },
|
||||||
|
{ 6, 10, 13, 11 },
|
||||||
|
{ 7, 11, 13, 12 },
|
||||||
|
{ 8, 12, 13, 9 }
|
||||||
|
};
|
||||||
|
|
||||||
|
static double rdod_n[12][3] = {
|
||||||
|
{ 0.353553390594, 0.353553390594, 0.5 },
|
||||||
|
{ -0.353553390594, 0.353553390594, 0.5 },
|
||||||
|
{ -0.353553390594, -0.353553390594, 0.5 },
|
||||||
|
{ 0.353553390594, -0.353553390594, 0.5 },
|
||||||
|
{ 0.000000000000, 1.000000000000, 0.0 },
|
||||||
|
{ -1.000000000000, 0.000000000000, 0.0 },
|
||||||
|
{ 0.000000000000, -1.000000000000, 0.0 },
|
||||||
|
{ 1.000000000000, 0.000000000000, 0.0 },
|
||||||
|
{ 0.353553390594, 0.353553390594, -0.5 },
|
||||||
|
{ -0.353553390594, 0.353553390594, -0.5 },
|
||||||
|
{ -0.353553390594, -0.353553390594, -0.5 },
|
||||||
|
{ 0.353553390594, -0.353553390594, -0.5 }
|
||||||
};
|
};
|
||||||
|
|
||||||
void FGAPIENTRY glutWireRhombicDodecahedron( void )
|
void FGAPIENTRY glutWireRhombicDodecahedron( void )
|
||||||
|
Reference in New Issue
Block a user