Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GLT


Files

file  buffer.cpp
file  buffer.h
 OpenGL Framebuffer Classes.

file  colmap.cpp
file  colmap.h
 One Dimensional Color-Mapping Class.

file  color.cpp
file  color.h
 OpenGL Color Interface.

file  config.cpp
file  config.h
 GLT Configuration File.

file  countsrf.cpp
file  countsrf.h
 Surface Counting Interface.

file  cursor.cpp
file  cursor.h
 OpenGL Cursor Interface.

file  dlcache.cpp
file  dlcache.h
 Display List Cache.

file  error.cpp
file  error.h
 OpenGL Debugging Tools.

file  font.cpp
file  font.h
 OpenGL Font Interface.

file  fontasci.cpp
file  fontasci.h
 Ascii OpenGL Font Interface.

file  fonttex.cpp
file  fonttex.h
 Textured OpenGL Font.

file  fontunic.cpp
file  fontunic.h
 OpenGL Unicode Font Class.

file  frame.cpp
file  frame.h
 OpenGL Frame Rate Information.

file  gl.h
 OpenGL (proxy) header file.

file  glu.h
 GLU (proxy) header file.

file  info.cpp
file  info.h
 Output OpenGL information.

file  light.cpp
file  light.h
 OpenGL Light Source Class.

file  lightm.cpp
file  lightm.h
 OpenGL Lighting Model Class.

file  material.cpp
file  material.h
 OpenGL Material Class.

file  matrix.cpp
file  matrix.h
 OpenGL Matrix Manipulation.

file  mcubes.cpp
file  mcubes.cpp
file  mcubes.h
 Marching Cubes Interface.

file  project.cpp
file  project.h
 OpenGL Projection Classes.

file  raster.cpp
file  raster.h
 OpenGL Raster Position Class.

file  rgb.cpp
file  rgb.h
 OpenGL Convenience Colors.

file  texture.cpp
file  texture.h
 OpenGL Texture Class.

file  viewport.cpp
file  viewport.h
 OpenGL Viewport Class.

file  zplane.cpp
file  zplane.h
 Z-Plane Drawing.

file  zvis.cpp
file  zvis.h
 OpenGL Z-Buffer Visualisation.


Compounds

class  GltFrameBuffer
 Base class for framebuffer interfaces. More...

class  GltFrameBufferRGB
 RGB frame buffer interface. More...

class  GltFrameBufferZ
 Z-buffer interface. More...

class  GltFrameBufferStencil
 Stencil buffer interface. More...

class  GltColorMap
 One Dimensional Color-Mapping Class. More...

class  GltColor
 OpenGL RGB Color. More...

class  GltClearColor
 OpenGL RGB Clear Color. More...

class  GltCursor
 Cursor position class. More...

class  GltDisplayListCache
 Display List Cache. More...

class  GltFont
 Abstract base class for bitmap fonts. More...

class  GltFontAscii
 GLT ASCII font class. More...

class  GltFontTexture
 GLT Textured font class. More...

class  GltFontUnicode
 OpenGL Unicode Font Class. More...

class  GltFrameRate
 OpenGL Frame Rate Information Class. More...

class  GltLight
 OpenGL Light Source Class. More...

class  GltLightModel
 OpenGL Lighting Model Class. More...

class  GltMaterial
 OpenGL Material Class. More...

class  GltPushMatrix
 OpenGL Push-Matrix Convenience Class. More...

class  GltOrtho
 OpenGL Orthographic Camera Class. More...

class  GltFrustum
 OpenGL Perspective Camera Class. More...

class  GltRasterPos
 OpenGL Raster Position Class. More...

class  GltTexture
 OpenGL Texture Class. More...

class  GltViewport
 OpenGL Viewport Class. More...

class  GltSkyBox
 OpenGL Sky Box. More...

class  GltSkySphere
 OpenGL Sphere Box. More...


Defines

#define GLERROR
 Check OpenGL error state.


Typedefs

typedef GltFrameBufferZ< GLfloat,
GL_FLOAT > 
GltFrameBufferZFloat
 Floating point z-buffer.

typedef GltFrameBufferZ< GLushort,
GL_UNSIGNED_SHORT > 
GltFrameBufferZShort
 Unsigned short z-buffer.

typedef GltFrameBufferZ< GLuint,
GL_UNSIGNED_INT > 
GltFrameBufferZUint
 Unsigned integer z-buffer.

typedef GltFrameBufferStencil<
GLubyte, GL_UNSIGNED_BYTE > 
GltFrameBufferStencilUbyte
 Unsigned byte stencil buffer.


Enumerations

enum  GltTextureType {
  TEXTURE_TYPE_RGB = 0, TEXTURE_TYPE_RGBA, TEXTURE_TYPE_GREY, TEXTURE_TYPE_GREYA,
  TEXTURE_TYPE_ALPHA, TEXTURE_TYPE_BITMAP, TEXTURE_TYPE_INDEXED_RGB, TEXTURE_TYPE_INDEXED_RGBA
}
 GLT texture types. More...


Functions

GltColor operator * (const GltColor &c, const real x)
 Scale color.

GltColor operator/ (const GltColor &c, const real x)
 Scale color.

GltColor operator * (const real x, const GltColor &c)
 Scale color.

GltColor operator+ (const GltColor &c1, const GltColor &c2)
 Add red, green and blue components.

GltColor operator- (const GltColor &c1, const GltColor &c2)
 Subtract red, green and blue components.

void countSurfaces (const GltShape &shape)
 Use the stencil buffer to count the number of surfaces drawn at each pixel.

GLubyte countSurfaces (const GltShape &shape, const countSurfacesMode mode)
 Use the stencil buffer to count the number of surfaces drawn at each pixel.

GLubyte countSurfacesVisualise (const GltShape &shape)
 Visualise the number of rendered surfaces at each pixel.

GLuint stencilHistogram (GLuint histogram[256])
 Extract a stencil buffer histogram for the current viewport.

void glTranslate (const Vector &tr)
 OpenGL vector translation.

void glScale (const Vector &sf)
 OpenGL non-uniform scale.

void glScale (const GLdouble sf)
 OpenGL uniform scale.

void glScale (const GLfloat sf)
 OpenGL uniform scale.

void glScale (const GLint sf)
 OpenGL uniform scale.

void glScale (const GLuint sf)
 OpenGL uniform scale.

void glRotateX (const GLdouble angle, const Vector &axis)
 OpenGL rotation.

void glRotateX (const GLdouble angle)
 OpenGL rotation around X axis.

void glRotateX (const GLfloat angle)
 OpenGL rotation around X axis.

void glRotateX (const GLint angle)
 OpenGL rotation around X axis.

void glRotateX (const GLuint angle)
 OpenGL rotation around X axis.

void glRotateY (const GLdouble angle)
 OpenGL rotation around Y axis.

void glRotateY (const GLfloat angle)
 OpenGL rotation around Y axis.

void glRotateY (const GLint angle)
 OpenGL rotation around Y axis.

void glRotateY (const GLuint angle)
 OpenGL rotation around Y axis.

void glRotateZ (const GLdouble angle)
 OpenGL rotation around Z axis.

void glRotateZ (const GLfloat angle)
 OpenGL rotation around Z axis.

void glRotateZ (const GLint angle)
 OpenGL rotation around Z axis.

void glRotateZ (const GLuint angle)
 OpenGL rotation around Z axis.

int GltMarchingCubes (GltFunc3d func, float minx, float miny, float minz, float maxx, float maxy, float maxz, int xsteps, int ysteps, int zsteps)
 Marching Cubes Algorithm.

void drawZnear ()
 Draw an OpenGL polygon at Z-near, covering the viewport.

void drawZfar ()
 Draw an OpenGL polygon at Z-far, covering the viewport.

void drawZat (const GLdouble z)
 Draw an OpenGL polygon at a z-position, covering the viewport.


Define Documentation

#define GLERROR
 

Value:

{                                                       \
        GLenum code = glGetError();                         \
        while (code!=GL_NO_ERROR)                           \
        {                                                   \
            std::cerr << __FILE__;                          \
            std::cerr << ':' << __LINE__;                   \
            std::cerr << ' ' << (char *) gluErrorString(code) << std::endl; \
            code = glGetError();                            \
        }                                                   \
    }
Check OpenGL error state.

Note:
Does nothing if NDEBUG is defined

Definition at line 56 of file error.h.

Referenced by countSurfaces(), GltTextureViewport::draw(), GltTextOverlay::draw(), GltSkySphere::draw(), GltSkyBox::draw(), GltHistogram::draw(), GltFadeViewport::draw(), GlutTeapot::draw(), GlutIcosahedron::draw(), GlutTetrahedron::draw(), GlutOctahedron::draw(), GlutDodecahedron::draw(), GlutTorus::draw(), GlutCone::draw(), GlutCylinder::draw(), GlutCube::draw(), GlutSphere::draw(), GltViewport::get(), GltMaterial::get(), GltLight::get(), GltColor::glGetLight(), GltColor::glGetMaterial(), GltColor::glLight(), GltColor::glMaterial(), GltCursor::GltCursor(), GltInfo(), GltPushMatrix::GltPushMatrix(), GltTexture::init(), GltFrameBufferStencil< StencilType, GlStencilType >::read(), GltFrameBufferZ< DepthType, GlDepthType >::read(), GltViewport::set(), GltMaterial::set(), GltFrameBufferStencil< StencilType, GlStencilType >::write(), GltFrameBufferZ< DepthType, GlDepthType >::write(), GltCursor::~GltCursor(), and GltPushMatrix::~GltPushMatrix().


Enumeration Type Documentation

enum GltTexture::GltTextureType [inherited]
 

GLT texture types.

Enumeration values:
TEXTURE_TYPE_RGB  RGB
TEXTURE_TYPE_RGBA  RGBA
TEXTURE_TYPE_GREY  Greyscale
TEXTURE_TYPE_GREYA  Greyscale, Alpha
TEXTURE_TYPE_ALPHA  Alpha
TEXTURE_TYPE_BITMAP  Bitmap
TEXTURE_TYPE_INDEXED_RGB  Indexed RGB
TEXTURE_TYPE_INDEXED_RGBA  Indexed RGBA

Definition at line 151 of file texture.h.


Function Documentation

void countSurfaces const GltShape   shape
 

Use the stencil buffer to count the number of surfaces drawn at each pixel.

Parameters:
shape  Shapes
Warning:
Uses the current culling configuration

Definition at line 28 of file countsrf.cpp.

GLubyte countSurfaces const GltShape   shape,
const countSurfacesMode    mode
 

Use the stencil buffer to count the number of surfaces drawn at each pixel.

Parameters:
shape  Shapes
mode  Count Mode
Returns:
Maximum number of surfaces covering a pixel
Warning:
Uses the current culling configuration

Definition at line 65 of file countsrf.cpp.

References COUNT_SURFACES_99TH_PERCENTILE, COUNT_SURFACES_ALL, countSurfacesMode, GLERROR, and stencilHistogram().

Referenced by countSurfacesVisualise().

GLubyte countSurfacesVisualise const GltShape   shape
 

Visualise the number of rendered surfaces at each pixel.

Parameters:
shape  Shapes
Returns:
Maximum number of surfaces covering a pixel
Warning:
Uses the current culling configuration

Definition at line 139 of file countsrf.cpp.

References COUNT_SURFACES_ALL, countSurfaces(), drawZnear(), GltColor::glColor(), and maxColors.

GLuint stencilHistogram GLuint    histogram[256]
 

Extract a stencil buffer histogram for the current viewport.

Parameters:
histogram  Array of GLuint histogram entries
Returns:
Number of pixels in the current viewport

Definition at line 181 of file countsrf.cpp.

Referenced by countSurfaces().

void glTranslate const Vector   tr [inline]
 

OpenGL vector translation.

Parameters:
tr  Distance to translate in x, y and z

Definition at line 77 of file matrix.h.

References Vector::x(), Vector::y(), and Vector::z().

void glScale const Vector   sf [inline]
 

OpenGL non-uniform scale.

Parameters:
sf  Scaling factor in x, y and z

Definition at line 87 of file matrix.h.

References Vector::x(), Vector::y(), and Vector::z().

void glScale const GLdouble    sf [inline]
 

OpenGL uniform scale.

Parameters:
sf  Scaling factor

Definition at line 93 of file matrix.h.

void glScale const GLfloat    sf [inline]
 

OpenGL uniform scale.

Parameters:
sf  Scaling factor

Definition at line 99 of file matrix.h.

void glScale const GLint    sf [inline]
 

OpenGL uniform scale.

Parameters:
sf  Scaling factor

Definition at line 105 of file matrix.h.

void glScale const GLuint    sf [inline]
 

OpenGL uniform scale.

Parameters:
sf  Scaling factor

Definition at line 111 of file matrix.h.

void glRotateX const GLdouble    angle,
const Vector   axis
[inline]
 

OpenGL rotation.

Parameters:
angle  Angle in degrees
axis  Axis of rotation

Definition at line 122 of file matrix.h.

References Vector::x(), Vector::y(), and Vector::z().

void glRotateX const GLdouble    angle [inline]
 

OpenGL rotation around X axis.

Parameters:
angle  Angle in degrees

Definition at line 131 of file matrix.h.

void glRotateX const GLfloat    angle [inline]
 

OpenGL rotation around X axis.

Parameters:
angle  Angle in degrees

Definition at line 137 of file matrix.h.

void glRotateX const GLint    angle [inline]
 

OpenGL rotation around X axis.

Parameters:
angle  Angle in degrees

Definition at line 143 of file matrix.h.

void glRotateX const GLuint    angle [inline]
 

OpenGL rotation around X axis.

Parameters:
angle  Angle in degrees

Definition at line 149 of file matrix.h.

Referenced by GlutAxes::draw().

void glRotateY const GLdouble    angle [inline]
 

OpenGL rotation around Y axis.

Parameters:
angle  Angle in degrees

Definition at line 155 of file matrix.h.

void glRotateY const GLfloat    angle [inline]
 

OpenGL rotation around Y axis.

Parameters:
angle  Angle in degrees

Definition at line 161 of file matrix.h.

void glRotateY const GLint    angle [inline]
 

OpenGL rotation around Y axis.

Parameters:
angle  Angle in degrees

Definition at line 167 of file matrix.h.

void glRotateY const GLuint    angle [inline]
 

OpenGL rotation around Y axis.

Parameters:
angle  Angle in degrees

Definition at line 173 of file matrix.h.

Referenced by GlutAxes::draw().

void glRotateZ const GLdouble    angle [inline]
 

OpenGL rotation around Z axis.

Parameters:
angle  Angle in degrees

Definition at line 179 of file matrix.h.

void glRotateZ const GLfloat    angle [inline]
 

OpenGL rotation around Z axis.

Parameters:
angle  Angle in degrees

Definition at line 185 of file matrix.h.

void glRotateZ const GLint    angle [inline]
 

OpenGL rotation around Z axis.

Parameters:
angle  Angle in degrees

Definition at line 191 of file matrix.h.

void glRotateZ const GLuint    angle [inline]
 

OpenGL rotation around Z axis.

Parameters:
angle  Angle in degrees

Definition at line 197 of file matrix.h.

int GltMarchingCubes GltFunc3d    func,
float    minx,
float    miny,
float    minz,
float    maxx,
float    maxy,
float    maxz,
int    xsteps,
int    ysteps,
int    zsteps
 

Marching Cubes Algorithm.

A simple implementation of the marching cubes algorithm for tesselating a 3d function. The function is tesselated into triangle faces and drawn using OpenGL. You are free to use all or part of this code in your own programs as long as proper credit is given.

Parameters:
func  Function to evaluate
minx  Minimum X of bounding box
miny  Minimum Y of bounding box
minz  Minimum Z of bounding box
maxx  Maximum X of bounding box
maxy  Maximum Y of bounding box
maxz  Maximum Z of bounding box
xsteps  Level of detail in x direction
ysteps  Level of detail in y direction
zsteps  Level of detail in z direction
Returns:
1 on success, 0 on failure
Note:
The bounding box is axis aligned.
Author:
Steve Anger (70714.3113@compuserve.com)

Definition at line 66 of file mcubes.cpp.

References GltFunc3d.


Generated on Tue Nov 5 11:11:49 2002 for GLT by doxygen1.2.18