Need a 3D graph? Try the 3DSurface Viewer! Draw 3D graphs with free calculus software from Bright Ideas Software.
GLE32 Ver. 4 Manual
  Skip Navigation Links
Math ToolsExpand Math Tools
DevelopersExpand Developers
About BISExpand About BIS
  Skip Navigation LinksHome --> Developers --> GLE32 Version 4 --> GLE32 Manual --> Simple Objects Search:
Skip Navigation Links

OpenGL® and OpenGL|ES are trademarks of Silicon Graphics, Inc.





Simple Objects

This version of the GLE32 library contains classes for drawing spheres and toroids, and stand-alone functions for drawing boxes, tetrahedrons, octahedrons, dodecahedrons, icosahedrons and the venerable Utah teapot. It also provides a set of funcutions that wrap the glu quadric object functionality, maintaining a gluQuadric object internally within the library.

The sphere and toroid classes, outlined below, maintain internally a set of vertex, normal and texture coordinate information generated by either the first call to Draw or a preparatory call to PreparePoints. It will reuse this information until one of the parameters (i.e., radius) changes. This being the case, if one requires spheres at different sizes, it will probably be more efficient to have one object for each size rather than using s given sphere for various sizes.


CgleSphere

Methods

  

Description

 CgleSphere ()   
 ~CgleSphere ()   
 
void PreparePoints (double radius, int slices, int stacks)  Precalculate the vertex, normal vector and texture coordinate data.
void Draw (double radius, int slices, int stacks, BOOL textured)  Calculate the data if it hasn't been precalculated, then draw the sphere, optionally with texture coordinates.
double* GetVerts ()  Returns a pointer to the vertex data array. The array holds stacks * (slices + 1) * 6 elements.
double* GetNorms ()  Returns a pointer to the normal vector data array. Same number of elements as the vertex array.
double* GetTexCoords ()  Returns a pointer to the texture coordinate data array. The array contains stacks * (slices + 1) * 4 elements.

CgleTorus

 CgleTorus ()  
 ~CgleTorus ()  
 
void PreparePoints (double crossSectionDiameter, double radius, int slices, int rings)  Precalculate vertex, normal vector and texture coordinate data.
void Draw (double crossSectionDiameter, double radius, int slices, int rings, BOOL textured)  Calculate the data if it hasn't been precalculated, then draw the sphere, optionally with texture coordinates.
double* GetVerts ()  Returns a pointer to the vertex data array. The array holds slices * (rings + 1) * 6 elements.
double* GetNorms ()  Returns a pointer to the normal vector data array. Same number of elements as the vertex array.
double* GetTexCoords ()  Returns a pointer to the texture coordinate data array. The array contains slices * (rings + 1) * 4 elements.

Other Shapes

void gleBox (double Width, double Depth, double Height, BOOL bTextured = FALSE)  
void gleTetrahedron (double Scale, BOOL bTextured = FALSE)  
void gleOctahedron (double Scale, BOOL bTextured = FALSE)  
void gleDodecahedron (double Scale, BOOL bTextured = FALSE)  
void gleIcosahedron (double Scale, BOOL bTextured = FALSE)  
void gleTeapot (int complexity, double Scale, BOOL bTextured = FALSE)  

gluQuadric Wrapper

Variables

  

Description

static GLUquadricObject* gle32QuadObj  The quadric used in the following functions.
 

Methods

  

Description

void gleInitializeQuadric ()  Initializes the internal quadric object.
void gleDestroyQuadric ()  Destroy the internal quadric.
void gleQuickCylinder (double Radius, double Height, int Slices, int Stacks)   
void gleQuickClosedCone (double BaseRadius, double Height, int Slices, int Stacks)  Cone with a disk capping the base.
void gleQuickDisk (double Radius, int Slices, int Loops)   

Back To Top



Copyright© 2001-2008 by Bright Ideas Software®. All rights reserved.