Next: Virtual member functions
Up: DisplayDevice
Previous: Enumerationslists or character
- int colorCat - the index of the color category which holds the `Background' color item. DisplayDevice is derived from ColorUser, and creates a new category `Display' which holds the names used for coloring items in DisplayDevice. The background color is accessed through this category, when the display is cleared.
- long xOrig, yOrig, xSize, ySize - the position of the lower-left corner of the graphics window, and the size of the window, in pixels.
- float backColor[3] - the color of the background, as should be used the next time the display is cleared. When the background color is changed via user commands, the virtual function do_color_changed gets called and the value of backColor gets updated.
- int Dim - the current dimension of the display, 2 or 3. Note that presently 2D drawing still needs work.
- Stack<Matrix4> transMat - the transformation matrix stack for this display. The top matrix is the matrix used to transform `world' coordinates to pre-projection coordinates. It can be pushed and popped with the push() and pop() virtual routines in DisplayDevice. Some devices may wish to use some other matrix stack, for example the GL matrix stack.
- int lineStyle, lineWidth, sphereRes, sphereMode - the current settings for these drawing characteristics. They may be modified through DisplayDevice calls, but are most often changed via drawing command in a display list created by a Displayable.
- float eyePos[3], nearClip, farClip, vSize, zDist, Aspect, cpUp, cpDown, cpLeft, cpRight - these describe the current viewing geometry, by specifying where the viewer's eye is located, how far from the eye to the near and far clipping planes, and how large the screen is vertically and how far it is from the origin. When these values have been given, the routine calc_frustrum() is used to calculate the current aspect ratio, and the location of the corners of the viewing frustrum (the pyramid-shaped view formed from the eye (located at the tip of the pyramid) to the screen (located at the base of the pyramid).
- int inStereo, stereoModes - the current stereo mode; 0 always means the display is not in stereo, while values greater than 0 indicate one of the display's available mode. stereoModes indicates how many different modes are available. Each DisplayDevice must set this to indicate if it has stereo capabilities.
- char **stereoNames - a pointer to an array of names used to indicate the different stereo modes available. There should be stereoModes number of names in this list. Note that `stereo off' counts as one mode, and is the default. So, if a new DisplayDevice cannot display stereo, it should not change this variable, or stereoModes.
- float eyeSep, eyeDist, eyeDir[3], upDir[3], eyeSepDir[3] - these describe the current stereo viewing geometry. Along with the eye position, these define vectors describing where the eye is looking, where the `up' direction is, and a vector along the line formed between the two eyes. These also describe how far apart the eyes are, and how far from the current eye position to the viewing focal point.
- int lightDefined[], lightOn[] - flags indicating whether data for the light sources has been provided (via a drawing command), and whether the light sources are currently on or off.
- float lightColor[][3], lightPos[][3] - the RGB color, and XYZ position, of each light source.
- int matDefined[], materialsActive, materialOn - flags indicating whether data for material characteristics has been provided (via a drawing command), whether material characteristics should be used or not when drawing polygons, and the current material index that should be used to draw the next polygon (if materialsActive is true).
- float matData[][] - the color, emissitivity, specularity, transparency, etc. of each material that has been defined.
- pickRegion - how large an area to use as the search region when a pointer is attempting to select an item. When picking items, the graphics window is assumed to be in `relative scaled coordinates', that is, it is assumed to have coordinates 0 ... 1 in both the X and Y directions, with the origin in the lower left corner. Having a pickRegion == 1.0 means the entire screen. A typical value for this is 0.01.
Next: Virtual member functions
Up: DisplayDevice
Previous: Enumerationslists or character
Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999