OpenGLEAN Shapes Development
Summary
|
CVS
|
(discussion via home page)
|
(contact via home page)
|
(suggestion box)
|
License
|
Todo
|
Bugs
This propsal seeks to outline a problem caused by a somewhat ad-hoc API for extant shapes, and also seeks to outline a solution.
When GLUT added some shape-drawing features, they appear to have been done ad-hoc: The teapot is the only one that was textured, and generated the "solid" and "wire" variations at different fixed mesh densities. There is no option to choose between smooth and faceted for various objects. Most objects seem to be drawn to just reach out to the unit sphere, while others go out further (up to the square root of 3 or possibly larger). Some, but not all, permit the client to control the size, mesh density, or even recursive depth (in the case of a freeglut fractal shape). The terminology used for some of these can be confusion, even backwards from waht one might normally expect.
In the case of the freeglut fractal shape, the client is required to provide a kind of workspace vector for the library function to use.
The proposed solution is to:
- Provide a flag option for all shapes to get texture coords.
- Provide a flag option for all shapes to control smooth shading.
- Provide mesh density controls. For clearly faceted objects like the cube, you can still subdivide the facets to improve lighting effects.
- Try to find better terminology for formal arguments, especially for shapes like the torus.
- Make size control uniform. (Currently leaning towards saying that all objects can be scaled by the OpenGL glScale*() support.)
- Make it possible to fit all objects to unit-sphere easily without knowing the object: Either pass in a unit size, or simply draw all objects to unit size.
Whether we truly want to sub-divide facets on, e.g., an icosohedron, is not clear. Much less whether we should subdivide by creating a center point, or by breaking the edges, or by defining 2 dimensional mess densities.
Also, the teapot is made of several polynomial mesh patches. As a result, just as with cubes, you can't set an overall density along any given axis to completely arbitrary values. You can define mesh densities of patches, or by working from requested densities and number of patches, give at least the requested density.
It is unclear exactly where some parts of this idea should go, and will be a bit tedious to implement, so at this time the proposal is shelved. But "It would be nice..."
Supported in part by SourceForge.net.
Generated on Fri Sep 9 18:03:39 2005 for OpenGLEAN'sgleanshapes by
doxygen 1.4.3
The OpenGLEAN project is hosted by
SourceForge.