Module box
OpenGL boxes.
NOTE: This module has been deprecated for graphics3d.polyhedron
The box module allows creation and drawing of boxes. Boxes do not
have to be cubes. In fact, the only requirements are that each face
contain exactly four vertices, and there be a total of exactly 6 total
faces.
Drawing is done in whatever is the current GL rendering context and
current GL window. So you must set those prior to drawing. If you are
using this with Maestro's drawing callback mechanism you need not worry
about the above details. These are handled for you automatically.
Control over the vertices, color, and opacity of a box are provided.
See the Box class for more info.
To draw any number of boxes, create the Box instances, add them to a
Group instance then invoke the Group's draw() method.
Note that transparent boxes may not render correctly. The final
polygons would need to be sorted and drawn based on the z position. This
is not done and even if it were the box class is not (and cannot) be
aware of any 3D objects Maestro draws diretly itself. If your Workspace
can have multiple transparent objects and you need transparent boxes that
always render properly, try polyhedron.MaestroCube class.
Copyright Schrodinger, LLC. All rights reserved.
|
Box
Class to draw a 3D box in OpenGL.
|
|
version = "$Revision: 1.10 $"
|
|
OPACITY_DEFAULT = 1.0
|
|
BOUNDING_BOX_INIT_VALUE = 100000000.0
|