#include <DisplayDevice.h>
Inheritance diagram for DisplayDevice:

Public Types | |
| enum | DisplayEye { NOSTEREO, LEFTEYE, RIGHTEYE } |
| enum for left or right eye. More... | |
| enum | Buttons { B_LEFT, B_MIDDLE, B_RIGHT, B2_LEFT, B2_MIDDLE, B2_RIGHT, B_F1, B_F2, B_F3, B_F4, B_F5, B_F6, B_F7, B_F8, B_F9, B_F10, B_F11, B_F12, B_ESC, TOTAL_BUTTONS } |
| enum for the mouse buttons, function keys, and special meta keys. More... | |
| enum | EventCodes { WIN_REDRAW, WIN_LEFT, WIN_MIDDLE, WIN_RIGHT, WIN_WHEELUP, WIN_WHEELDOWN, WIN_MOUSEX, WIN_MOUSEY, WIN_KEYBD, WIN_NOEVENT } |
| enum for window events. More... | |
| enum | CursorCodes { NORMAL_CURSOR, TRANS_CURSOR, SCALE_CURSOR, PICK_CURSOR, WAIT_CURSOR } |
| enum for cursor types. More... | |
| enum | Projection { PERSPECTIVE, ORTHOGRAPHIC, NUM_PROJECTIONS } |
| enum for the possible projection modes. More... | |
| enum | { SHIFT = 1, CONTROL = 2, ALT = 4, AUX = 8 } |
| absolute position of cursor from lower-left corner Mouse and keyboard shift state, joystick/sball aux key/button state. More... | |
Public Methods | |
| int | needRedraw (void) const |
| display state has changed, requiring a redraw. More... | |
| virtual int | get_num_processes () |
| return the number of display processes. More... | |
| virtual int | is_renderer_process () |
| Projection | projection () const |
| virtual int | do_define_light (int, float *, float *) |
| virtual routines to deal with light sources, return success/failure. More... | |
| virtual int | do_activate_light (int, int) |
| void | use_colors (const float *c) |
| Use this for colors. More... | |
| DisplayDevice (const char *) | |
| virtual | ~DisplayDevice (void) |
| DisplayDevice & | operator= (DisplayDevice &) |
| copies over all relevant properties from one DisplayDevice to another. More... | |
| virtual int | init (int argc, char **argv, VMDApp *app, int *size, int *loc) |
| do actual window construction here. Return true if the window was successfully created; false if not. More... | |
| virtual int | supports_gui () |
| Does this display device support GUI's? The default stub display does not. More... | |
| virtual void | queue_events (void) |
| virtual int | read_event (long &, long &) |
| virtual int | x (void) |
| virtual int | y (void) |
| absolute position of cursor from lower-left corner. More... | |
| virtual int | shift_state (void) |
| virtual int | spaceball (int *, int *, int *, int *, int *, int *, int *) |
| return the shift state (ORed enums). More... | |
| virtual void | set_cursor (int) |
| float | distance_to_screen (void) |
| return/set the distance from the origin to the screen. More... | |
| void | distance_to_screen (float zd) |
| float | screen_height (void) |
| return the height of the screen. More... | |
| void | screen_height (float vs) |
| void | set_screen_pos (float vsize, float zdist, float asp) |
| a) specify aspect ratio. More... | |
| void | set_screen_pos (float vs, float zd) |
| b) have device provide aspect ratio. More... | |
| void | set_screen_pos (float asp) |
| c) just specify aspect ratio. More... | |
| void | set_screen_pos (void) |
| d) do not specify anything. More... | |
| void | resize_window (int w, int h) |
| Resize the window. More... | |
| void | reposition_window (int xpos, int ypos) |
| Reposition the window. More... | |
| virtual void | set_stereo_mode (int=0) |
| change to a different stereo mode (0 means 'off'). More... | |
| int | stereo_mode (void) |
| current stereo mode ... 0 means non-stereo, others device-specific. More... | |
| virtual int | forced_stereo_draws (void) |
| whether we must force mono draws in stereo or not. More... | |
| int | num_stereo_modes (void) |
| number of different stereo modes supported ... 0 means no stereo. More... | |
| const char * | stereo_name (int n) |
| return stereo name string, if possible. More... | |
| virtual void | set_cache_mode (int=0) |
| change to a different caching mode (0 means 'off'). More... | |
| int | cache_mode (void) |
| return current caching mode. More... | |
| int | num_cache_modes (void) |
| number of different caching modes supported ... 0 means 'off'. More... | |
| const char * | cache_name (int n) |
| return caching name string, if possible. More... | |
| virtual void | set_render_mode (int=0) |
| change to a different rendering mode (0 means 'normal'). More... | |
| int | render_mode (void) |
| return current rendering mode. More... | |
| int | num_render_modes (void) |
| number of different rendering modes supported ... 0 means 'normal'. More... | |
| const char * | render_name (int n) |
| return rendering name string, if possible. More... | |
| int | set_eye_defaults (void) |
| set default eye position, orientation information. More... | |
| int | set_eye_pos (float *pos) |
| set eye position. More... | |
| int | get_eye_pos (float *pos) |
| get eye position. More... | |
| int | set_eye_dir (float *dir) |
| set eye direction. More... | |
| int | get_eye_dir (float *dir) |
| get eye direction. More... | |
| int | set_eye_up (float *updir) |
| set the eye up direction. More... | |
| int | get_eye_up (float *updir) |
| query the eye up direction. More... | |
| float | eye_dist (void) const |
| return focal length. More... | |
| int | set_eye_dist (float flen) |
| change focal length; this means adjusting eyeDir and updating eyeDist accordingly (eyeDist is just norm(eyeDir)). More... | |
| float | eyesep (void) const |
| return eye separation. More... | |
| float | set_eyesep (float newsep) |
| set eye separation. More... | |
| void | right_eye_dir (float &x, float &y, float &z) const |
| find the direction to the right eye position. More... | |
| int | num_projections () const |
| get/change the viewing matrix. More... | |
| const char * | projection_name (int i) const |
| const char * | get_projection () const |
| int | set_projection (const char *proj) |
| virtual void | abs_screen_loc_3D (float *, long *) |
| return absolute 2D screen coordinates, given 3D world coordinates. More... | |
| virtual void | abs_screen_loc_2D (float *, long *) |
| return absolute 2D screen coordinates, given 2D world coordinates. More... | |
| virtual void | rel_screen_pos (float &x, float &y) |
| convert 2D absolute screen coords into relative coords, 0 ... 1. More... | |
| void | abs_screen_pos (float &x, float &y) |
| convert 2D relative screen coords into absolute coords. More... | |
| virtual void | find_3D_from_2D (const float *, const float *, float *) |
| virtual void | loadmatrix (const Matrix4 &) |
| replace transformation matrix. More... | |
| virtual void | multmatrix (const Matrix4 &) |
| multiply transformation matrix. More... | |
| void | set_background_mode (int newmode) |
| set display background type. More... | |
| int | background_mode (void) |
| return active background mode. More... | |
| virtual void | set_background (const float *) |
| set main background color. More... | |
| virtual void | set_backgradient (const float *, const float *) |
| set gradient colors. More... | |
| virtual int | prepare3D (int=TRUE) |
| ready to draw 3D. More... | |
| virtual int | prepareOpaque (void) |
| draw opaque objects. More... | |
| virtual int | prepareTrans (void) |
| draw transparent objects. More... | |
| virtual void | clear (void) |
| erase the device. More... | |
| virtual void | left (void) |
| ready to draw left eye. More... | |
| virtual void | right (void) |
| ready to draw right eye. More... | |
| virtual void | normal (void) |
| ready to draw non-stereo. More... | |
| virtual void | update (int=TRUE) |
| finish up after drawing. More... | |
| virtual void | reshape (void) |
| refresh device after change. More... | |
| virtual unsigned char * | readpixels (int &x, int &y) |
| virtual routine for capturing the screen to a packed RGB array. More... | |
| virtual void | render (const VMDDisplayList *) |
| process list of draw commands. More... | |
| virtual void | render_done () |
| virtual int | pick (int, const float *, const VMDDisplayList *, float &, int *, float window_size) |
| int | aa_available (void) |
| query active display settings. More... | |
| int | cueing_available (void) |
| query active display settings. More... | |
| int | culling_available (void) |
| query active display settings. More... | |
| int | aa_enabled (void) |
| query active display settings. More... | |
| int | cueing_enabled (void) |
| query active display settings. More... | |
| int | culling_enabled (void) |
| query active display settings. More... | |
| float | aspect (void) |
| routines to deal with the clipping planes and eye position. More... | |
| float | near_clip (void) const |
| routines to deal with the clipping planes and eye position. More... | |
| float | far_clip (void) const |
| routines to deal with the clipping planes and eye position. More... | |
| float | clip_width (void) const |
| routines to deal with the clipping planes and eye position. More... | |
| float | addto_near_clip (float ac) |
| routines to deal with the clipping planes and eye position. More... | |
| float | addto_far_clip (float ac) |
| routines to deal with the clipping planes and eye position. More... | |
| float | set_near_clip (float nc) |
| routines to deal with the clipping planes and eye position. More... | |
| float | set_far_clip (float fc) |
| routines to deal with the clipping planes and eye position. More... | |
| const char * | get_cue_mode () const |
| routines to deal with depth cueing / fog. More... | |
| int | num_cue_modes () const |
| routines to deal with depth cueing / fog. More... | |
| const char * | cue_mode_name (int i) const |
| routines to deal with depth cueing / fog. More... | |
| int | set_cue_mode (const char *mode) |
| routines to deal with depth cueing / fog. More... | |
| float | get_cue_start () const |
| routines to deal with depth cueing / fog. More... | |
| float | set_cue_start (float s) |
| routines to deal with depth cueing / fog. More... | |
| float | get_cue_end () const |
| routines to deal with depth cueing / fog. More... | |
| float | set_cue_end (float e) |
| routines to deal with depth cueing / fog. More... | |
| float | get_cue_density () const |
| routines to deal with depth cueing / fog. More... | |
| int | set_cue_density (float d) |
| routines to deal with depth cueing / fog. More... | |
| virtual void | aa_on (void) |
| virtual function for depth cuing and antialiasing control. More... | |
| virtual void | aa_off (void) |
| virtual function for depth cuing and antialiasing control. More... | |
| virtual void | cueing_on (void) |
| virtual function for depth cuing and antialiasing control. More... | |
| virtual void | cueing_off (void) |
| virtual function for depth cuing and antialiasing control. More... | |
| virtual void | culling_on (void) |
| virtual function for depth cuing and antialiasing control. More... | |
| virtual void | culling_off (void) |
| virtual function for depth cuing and antialiasing control. More... | |
Public Attributes | |
| char * | name |
| name of this display device. More... | |
| int | _needRedraw |
| XXX public so FltkOpenGLDisplayDevice can access it. More... | |
| int | num_display_processes |
| number of CAVE/FreeVR display processes. More... | |
| int | renderer_process |
| true of we're a rendering process. More... | |
| long | xOrig |
| position and size of device, in 'pixels'. More... | |
| long | yOrig |
| position and size of device, in 'pixels'. More... | |
| long | xSize |
| position and size of device, in 'pixels'. More... | |
| long | ySize |
| position and size of device, in 'pixels'. More... | |
Protected Types | |
| enum | CueMode { CUE_LINEAR, CUE_EXP, CUE_EXP2, NUM_CUE_MODES } |
| Depth cueing mode enumerations. More... | |
Protected Methods | |
| virtual void | do_use_colors () |
| void | calc_frustum (void) |
| void | calc_eyedir (void) |
| virtual void | do_resize_window (int w, int h) |
| virtual void | do_reposition_window (int xpos, int ypos) |
| void | find_pbc_images (const VMDDisplayList *, ResizeArray< Matrix4 > &) |
| Find transformations corresponding to th periodic boundary conditions specified in the given display list. Append these transformations to the given array. More... | |
| void | find_pbc_cells (const VMDDisplayList *, ResizeArray< int > &) |
| Find the periodic cells that are turned on by the display list. Return in the ResizeArray with 3 values per cell, in the form na nb nc, where nx is the number of times to apply transform x to get to the cell. More... | |
Protected Attributes | |
| int | my_depth_sort |
| depth-sorting flag for tranparent objects? default is FALSE. More... | |
| const float * | colorData |
| cached pointer to color data; must be in shared memory for Cave-like. More... | |
| Stack< Matrix4 > | transMat |
| current transformation matrix for the display (NOT the projection matrix). More... | |
| int | backgroundmode |
| 0=normal, 1=gradient. More... | |
| float | eyePos [3] |
| current location of the viewer's eye. More... | |
| DisplayEye | whichEye |
| the eye we are currently drawing to. More... | |
| float | nearClip |
| float | farClip |
| dist from eye to near and far clip plane. More... | |
| CueMode | cueMode |
| fog/cueing mode. More... | |
| float | cueStart |
| float | cueEnd |
| fog start/end, used for linear fog/cueing. More... | |
| float | cueDensity |
| fog density, used for exp/exp2 fog/cueing. More... | |
| float | vSize |
| vertical size of 'screen'. More... | |
| float | zDist |
| distance to 'screen' relative to origin. More... | |
| float | Aspect |
| current window/image aspect ratio This is the width of the generated image (in pixels) divided by its height. NOT the aspect ratio of the pixels on the target display device. More... | |
| int | inStereo |
| current stereo mode (0 = non-stereo). More... | |
| int | stereoModes |
| total number of stereo modes (inc mono). More... | |
| const char ** | stereoNames |
| pointer to stereo mode names. More... | |
| int | cacheMode |
| current caching mode. More... | |
| int | cacheModes |
| total number of caching modes. More... | |
| const char ** | cacheNames |
| pointer to rendering mode names. More... | |
| int | renderMode |
| current rendering mode. More... | |
| int | renderModes |
| total number of rendering modes. More... | |
| const char ** | renderNames |
| pointer to rendering mode names. More... | |
| float | eyeSep |
| distance between eyes for stereo display. More... | |
| float | eyeDist |
| distance from eye to focal point. More... | |
| float | eyeDir [3] |
| direction viewer is looking. More... | |
| float | upDir [3] |
| direction which is 'up'. More... | |
| float | eyeSepDir [3] |
| vector from eye position to right eye magnitude is 1/2 eyeSep. More... | |
| int | mouseX |
| Mouse X position. More... | |
| int | mouseY |
| mouse Y position. More... | |
| int | screenX |
| total size of the screen, in pixels ... MUST BE SET BY DERIVED CLASS. More... | |
| int | screenY |
| total size of the screen, in pixels ... MUST BE SET BY DERIVED CLASS. More... | |
| int | aaAvailable |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | cueingAvailable |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | cullingAvailable |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | aaEnabled |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | cueingEnabled |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | cullingEnabled |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | aaPrevious |
| Capability and state flags for antialiasing and depth cueing. More... | |
| int | lineStyle |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | lineWidth |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | sphereRes |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | sphereMode |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| int | cylinderRes |
| drawing characteristics ... line style, sphere resolution, etc. More... | |
| float | cpUp |
| distances to near frustum base, which defines the view volume. More... | |
| float | cpDown |
| distances to near frustum base, which defines the view volume. More... | |
| float | cpLeft |
| distances to near frustum base, which defines the view volume. More... | |
| float | cpRight |
| distances to near frustum base, which defines the view volume. More... | |
Definition at line 35 of file DisplayDevice.h.
|
|
absolute position of cursor from lower-left corner Mouse and keyboard shift state, joystick/sball aux key/button state.
Definition at line 257 of file DisplayDevice.h. |
|
|
enum for the mouse buttons, function keys, and special meta keys.
Definition at line 44 of file DisplayDevice.h. |
|
|
Depth cueing mode enumerations.
Definition at line 86 of file DisplayDevice.h. |
|
|
enum for cursor types.
Definition at line 55 of file DisplayDevice.h. |
|
|
enum for left or right eye.
Definition at line 41 of file DisplayDevice.h. |
|
|
enum for window events.
Definition at line 50 of file DisplayDevice.h. |
|
|
enum for the possible projection modes.
Definition at line 90 of file DisplayDevice.h. Referenced by projection. |
|
|
Definition at line 48 of file DisplayDevice.C. References _needRedraw, aaAvailable, aaEnabled, aaPrevious, backgroundmode, cacheMode, cacheModes, cacheNames, cacheNameStr, calc_eyedir, CUE_EXP2, cueDensity, cueEnd, cueingAvailable, cueingEnabled, cueMode, cueStart, cylinderRes, eyeDist, eyePos, eyeSep, farClip, inStereo, lineStyle, lineWidth, mouseX, mouseY, name, nearClip, num_display_processes, PERSPECTIVE, Stack< Matrix4 >::push, renderer_process, renderMode, renderModes, renderNames, renderNameStr, screenX, screenY, set_eye_dir, set_screen_pos, sphereMode, sphereRes, stereoModes, stereoNames, stereoNameStr, stringdup, transMat, upDir, vec_scale, xOrig, xSize, yOrig, and ySize. |
|
|
Definition at line 125 of file DisplayDevice.C. References name, and set_stereo_mode. |
|
|
query active display settings.
Definition at line 225 of file DisplayDevice.h. References aaAvailable. Referenced by VMDApp::display_set_aa, and MainFltkMenu::MainFltkMenu. |
|
|
query active display settings.
Definition at line 228 of file DisplayDevice.h. References aaEnabled. Referenced by get, and text_cmd_display. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 289 of file DisplayDevice.C. Referenced by VMDApp::display_set_aa. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 288 of file DisplayDevice.C. Referenced by VMDApp::display_set_aa. |
|
||||||||||||
|
return absolute 2D screen coordinates, given 2D world coordinates.
Reimplemented in OpenGLRenderer. Definition at line 302 of file DisplayDevice.C. |
|
||||||||||||
|
return absolute 2D screen coordinates, given 3D world coordinates.
Reimplemented in OpenGLRenderer. Definition at line 296 of file DisplayDevice.C. Referenced by pick. |
|
||||||||||||
|
convert 2D relative screen coords into absolute coords.
Definition at line 615 of file DisplayDevice.h. References x, xOrig, xSize, y, yOrig, and ySize. Referenced by pick. |
|
|
routines to deal with the clipping planes and eye position.
Definition at line 294 of file DisplayDevice.h. References farClip, and set_far_clip. Referenced by VMDApp::display_set_farclip. |
|
|
routines to deal with the clipping planes and eye position.
Definition at line 293 of file DisplayDevice.h. References nearClip, and set_near_clip. Referenced by VMDApp::display_set_nearclip. |
|
|
routines to deal with the clipping planes and eye position.
Definition at line 289 of file DisplayDevice.h. References Aspect. Referenced by FPS::prepare, Axes::prepare, FileRenderer::set_aspectratio, and set_screen_pos. |
|
|
return active background mode.
Definition at line 637 of file DisplayDevice.h. References backgroundmode. |
|
|
return current caching mode.
Definition at line 465 of file DisplayDevice.h. References cacheMode. Referenced by text_cmd_display. |
|
|
return caching name string, if possible.
Definition at line 471 of file DisplayDevice.h. References cacheModes, and cacheNames. Referenced by VMDApp::display_set_cachemode, MainFltkMenu::MainFltkMenu, and text_cmd_display. |
|
|
calculate eyeSepDir, based on up vector and look vector eyeSepDir = 1/2 * eyeSep * (lookdir x updir) / mag(lookdir x updir) Definition at line 179 of file DisplayDevice.C. References eyeDir, eyeSep, eyeSepDir, and upDir. Referenced by DisplayDevice, set_eye_dist, set_eye_up, and set_eyesep. |
|
|
calculate the position of the near frustum plane, based on curr values of Aspect, vSize, zDist, nearClip and eyePosition Definition at line 149 of file DisplayDevice.C. References Aspect, cpDown, cpLeft, cpRight, cpUp, eyePos, nearClip, vSize, and zDist. Referenced by distance_to_screen, screen_height, set_near_clip, and set_screen_pos. |
|
|
erase the device.
Reimplemented in OpenGLRenderer. Definition at line 353 of file DisplayDevice.C. |
|
|
routines to deal with the clipping planes and eye position.
Definition at line 292 of file DisplayDevice.h. |
|
|
routines to deal with depth cueing / fog.
Definition at line 318 of file DisplayDevice.h. References NULL, and NUM_CUE_MODES. |
|
|
query active display settings.
Definition at line 226 of file DisplayDevice.h. References cueingAvailable. Referenced by VMDApp::display_set_depthcue, and MainFltkMenu::MainFltkMenu. |
|
|
query active display settings.
Definition at line 229 of file DisplayDevice.h. References cueingEnabled. Referenced by get, and text_cmd_display. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 291 of file DisplayDevice.C. Referenced by VMDApp::display_set_depthcue. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 290 of file DisplayDevice.C. Referenced by VMDApp::display_set_depthcue. |
|
|
query active display settings.
Definition at line 227 of file DisplayDevice.h. References cullingAvailable. Referenced by VMDApp::display_set_culling, and MainFltkMenu::MainFltkMenu. |
|
|
query active display settings.
Definition at line 230 of file DisplayDevice.h. References cullingEnabled. Referenced by get, and text_cmd_display. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 293 of file DisplayDevice.C. Referenced by VMDApp::display_set_culling. |
|
|
virtual function for depth cuing and antialiasing control.
Reimplemented in OpenGLRenderer. Definition at line 292 of file DisplayDevice.C. Referenced by VMDApp::display_set_culling. |
|
|
Definition at line 381 of file DisplayDevice.h. References _needRedraw, calc_frustum, and zDist. |
|
|
return/set the distance from the origin to the screen.
Definition at line 380 of file DisplayDevice.h. References zDist. Referenced by VMDApp::display_get_screen_distance, VMDApp::display_set_screen_distance, get, and text_cmd_display. |
|
||||||||||||
|
Reimplemented in FileRenderer. Definition at line 163 of file DisplayDevice.h. Referenced by Scene::draw. |
|
||||||||||||||||
|
virtual routines to deal with light sources, return success/failure.
Reimplemented in FileRenderer. Definition at line 162 of file DisplayDevice.h. Referenced by Scene::draw. |
|
||||||||||||
|
Reimplemented in OpenGLDisplayDevice. Definition at line 191 of file DisplayDevice.h. Referenced by reposition_window. |
|
||||||||||||
|
Do device-specific resizing or positioning of window Reimplemented in FltkOpenGLDisplayDevice. Definition at line 249 of file DisplayDevice.C. References set_screen_pos, xSize, and ySize. Referenced by resize_window. |
|
|
Reimplemented in FileRenderer. Definition at line 83 of file DisplayDevice.h. Referenced by use_colors. |
|
|
return focal length.
Definition at line 547 of file DisplayDevice.h. References eyeDist. Referenced by get, and text_cmd_display. |