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

glt/mcubes.h File Reference

Marching Cubes Interface. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


typedef float(* GltFunc3d )(float x, float y, float z)
 Marching Cubes Function Type.


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.

Detailed Description

Marching Cubes Interface.

Steve Anger (
mcubes.h,v 1.6 2002/10/07 16:33:35 nigels Exp

Revision 1.6 2002/10/07 16:33:35 nigels Added CVS info

Definition in file mcubes.h.

Function Documentation

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.

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
1 on success, 0 on failure
The bounding box is axis aligned.
Steve Anger (

Definition at line 66 of file mcubes.cpp.

References GltFunc3d.

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