<<<<<<<<<<<<<<<<<

vogle(vogle) Vogle vogle(vogle)

NAME

vogle - an interface to the public domain VOGLE rendering library

DESCRIPTION

The vogle class renders an image defined with LYMB objects (camera, lights, actors and modellers) using the public domain VOGLE (Very Open Graphics Learning Environment) rendering library. This is a 3D graphics library interface, based on Silicon Graphics' GL, that renders to 2D output devices. Supported devices include Tektronix, X Windows, PostScript, and SunView. Since the capabilities of these devices vary widely, VOGLE does not attempt to perform lighting, shading or hidden-surface removal. It acts only as a "wireframe" renderer.

SUPERCLASS

renderer

INSTANCE VARIABLES

initialized A flag indicating whether the VOGLE rendering system has been initialized.

output_file The name of the file in which the graphics output should be placed (only for devices with file output).

MESSAGES

initialized[=?] Set/get the value of the initialized variable.

initialized_on! Set the initialized flag on.

initialized_off! Set the initialized flag off.

output_file[=?] Set/get the name of the output file (only for devices with file output).

device_name? Returns the name of the device specified with the LYMB_DEVICE instance variable. If LYMB_DEVICE is not defined, the null string is returned. Subclasses of vogle (vogle_x11, vogle_ps, etc.) override this method to always return the correct device name.

class_name? Returns the string "vogle" so subclasses of vogle can still return the correct rendering class name

to the modeller classes.

initialize! Opens vogle via vinit(), turns on clipping and double buffering, if supported on the device.

start! Performs tasks needed before each frame is rendered. If this is the first time that a vogle object has received a render!, then the system is first initialized. Then device_name? is sent to the instance to find the type of device being rendered to. If it is a different device than the last device rendered to, the new device is opened. Finally the vieport is set and the image is cleared to the background color.

frame! Updates the display by swapping the frame buffers.

update_actor: The specified actor is drawn on the display using vogle geometric primitive calls.

update_camera: The view described by the specified camera is defined in vogle calls.

update_light: Lighting calculations are not performed in VOGLE since shading is not supported. This method does nothing, but is implemented to support the inherited rendering protocol.

render_all! Renders all instances of vogle deferring a buffer update (via frame!) until the last instance is rendered.

update_render_time! Overrides the inherited method to update the last time an image was rendered. This method always sets render_time to 0, forcing the start! message to initiate each frame of animation.

EXAMPLES

The following LYMB script demonstrates how an image is defined in LYMB. A camera is created which describes the view. A light is created which provides illumination. A geometric object is defined using a modeller and an actor. Finally, a renderer is created and informed about the elements (camera, light, actor) that comprise the image. The image is drawn by sending a render! to the rendering instance.

camera new: acamera

position=(8,8,8) focal_point=(0.0,0.0,0.0) view_angle=30 on! ;

light new: alight position=(10,5,8) on! ;

cylinder_modeller new: cylinder_model;

actor new: cylinder color=(1,0,0) modeller=cylinder_model ;

vogle new: arenderer -- LYMB_DEVICE must be set! actors=cylinder cameras=acamera lights=alight ;

arenderer render!;

SEE ALSO

actor, camera, light, renderer, model, phigs, gl, starbase, vogle_modeller, vogle_ps, vogle_sun, vogle_tek, vogle_x11, vogle_curses

NOTES AND BUGS

Surface Properties Color can be set but is mapped to the closest of 8 colors. A second level of mapping is performed internally in VOGLE if the device supports less than 8 colors.

Since VOGLE does not perform any lighting or shading, it does not support ambient, diffuse, specular or transparency properties.

Representations VOGLE does not support different representations of geoemtry. All primitives are displayed in "wireframe" mode (except of course the points primitive).

Primitives Vertex normals are ignored.

Vertex colors are supported with the limitation that they are clamped to the default color table.

Subtle variations in color are not noticeable.

Features Dumping an image to a file is supported with the vogle_ps driver. It will produce a PostScript wireframe image (vector image).

Window Informaion The display and window id can be queried (for the vogle_x11 renderer only), but not set. This allows you to listen for X events and to use other X objects to manipulate it, but you cannont tell the renderer to draw to a certain window.

Other Notes VOGLE is a 3D rendering library with 2D device drivers. It does not attempt to support surfaces, lighting or hidden-surface/line removal. Any of the features associated with these capabilites are accordingly not applicable.

The default color map of VOGLE is: 0 - black (0,0,0) 4 - blue (0,0,1) 1 - red (1,0,0) 5 - magenta (1,0,1) 2 - green (0,1,0) 6 - cyan (0,1,1) 3 - yellow (1,1,0) 7 - white (1,1,1)

All RGB colors are mapped to the closest table value (in RGB-space) before being set in VOGLE.


Please send comments and suggestions to
consult@rpi.edu