Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

DisplayDevice Class Reference

Abstract base class for objects which can process a list of drawing commands and render the drawing to some device (screen, file, preprocessing script, etc.), and provide mouse and keyboard events. More...

#include <DisplayDevice.h>

Inheritance diagram for DisplayDevice:

List of all members.

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_KBD, WIN_KBD_ESCAPE, WIN_KBD_UP, WIN_KBD_DOWN,
WIN_KBD_LEFT, WIN_KBD_RIGHT, WIN_KBD_PAGE_UP, WIN_KBD_PAGE_DOWN,
WIN_KBD_HOME, WIN_KBD_END, WIN_KBD_INSERT, WIN_KBD_DELETE,
WIN_KBD_F1, WIN_KBD_F2, WIN_KBD_F3, WIN_KBD_F4,
WIN_KBD_F5, WIN_KBD_F6, WIN_KBD_F7, WIN_KBD_F8,
WIN_KBD_F9, WIN_KBD_F10, WIN_KBD_F11, WIN_KBD_F12,
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...

void set_stereo_swap (int onoff)
swap left/right eyes when rendering in stereo (0 means not swapped). More...

int stereo_swap (void)
current stereo swap mode ... 0 means not swapped. 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 *, float *)
return normalized absolut 3D screen coordinates, given 3D world coordinates. (i.e the second parameter will return a 3D coordinate, with a normalized z). More...

virtual void abs_screen_loc_2D (float *, float *)
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_rgb3u (int &x, int &y)
virtual routine for capturing the screen to a packed RGB array. More...

virtual unsigned char * readpixels_rgba4u (int &x, int &y)
virtual routine for capturing the screen to a packed RGBA array. More...

virtual int drawpixels_rgba4u (unsigned char *rgba, int &x, int &y)
virtual routine for drawing the screen from a packed RGBA 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)
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...

virtual void cueing_on (void)
routines to deal with depth cueing / fog. More...

virtual void cueing_off (void)
routines to deal with depth cueing / fog. More...

int cueing_available (void)
routines to deal with depth cueing / fog. More...

int cueing_enabled (void)
routines to deal with depth cueing / fog. 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)
function for antialiasing control. More...

virtual void aa_off (void)
function for antialiasing control. More...

int aa_available (void)
function for antialiasing control. More...

int aa_enabled (void)
function for antialiasing control. More...

virtual void culling_on (void)
virtual function for controlling backface culling. More...

virtual void culling_off (void)
virtual function for controlling backface culling. More...

int culling_available (void)
virtual function for controlling backface culling. More...

int culling_enabled (void)
virtual function for controlling backface culling. More...

int set_shadow_mode (int onoff)
routines for controlling shadow rendering. More...

int shadows_enabled (void)
routines for controlling shadow rendering. More...

int set_ao_mode (int onoff)
routines for controlling ambient occlusion rendering. More...

int ao_enabled (void)
routines for controlling ambient occlusion rendering. More...

float get_ao_ambient () const
routines for controlling ambient occlusion rendering. More...

int set_ao_ambient (float a)
routines for controlling ambient occlusion rendering. More...

float get_ao_direct () const
routines for controlling ambient occlusion rendering. More...

int set_ao_direct (float d)
routines for controlling ambient occlusion rendering. More...

int set_dof_mode (int onoff)
routines for controlling depth of field rendering. More...

int dof_enabled (void)
routines for controlling depth of field rendering. More...

float get_dof_fnumber () const
routines for controlling depth of field rendering. More...

int set_dof_fnumber (float f)
routines for controlling depth of field rendering. More...

float get_dof_focal_dist () const
routines for controlling depth of field rendering. More...

int set_dof_focal_dist (float d)
routines for controlling depth of field rendering. More...


Public Attributes

VMDApp * vmdapp
VMDApp object ptr, for drag-and-drop handlers, and to allow subclasses to access to GPU management APIs, e.g. to force-free large memory buffers in GPU global memory prior to launching GPU ray tracing, etc. More...

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...

enum ShadowMode { SHADOWS_OFF, SHADOWS_ON }
Shadow rendering 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 the 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...

void find_instance_images (const VMDDisplayList *, ResizeArray< Matrix4 > &)
Find transformations corresponding to the list of active molecule instances specified in the given display list. Append these transformations to the given array. 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...

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 aoAmbient
AO ambient lighting factor. More...

float aoDirect
AO direct lighting rescaling factor. More...

float dofFNumber
DoF aperture. More...

float dofFocalDist
DoF focal plane distance. 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...

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 stereoSwap
whether left/right eyes are swapped. 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, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int cueingAvailable
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int cullingAvailable
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int aaEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int cueingEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int cullingEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int aoEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int shadowEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int dofEnabled
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. More...

int aaPrevious
Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field. 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...


Detailed Description

Abstract base class for objects which can process a list of drawing commands and render the drawing to some device (screen, file, preprocessing script, etc.), and provide mouse and keyboard events.

Definition at line 35 of file DisplayDevice.h.


Member Enumeration Documentation

anonymous enum

absolute position of cursor from lower-left corner Mouse and keyboard shift state, joystick/sball aux key/button state.

Enumeration values:
SHIFT
CONTROL
ALT
AUX

Definition at line 296 of file DisplayDevice.h.

enum DisplayDevice::Buttons

enum for the mouse buttons, function keys, and special meta keys.

Enumeration values:
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

Definition at line 49 of file DisplayDevice.h.

enum DisplayDevice::CueMode [protected]

Depth cueing mode enumerations.

Enumeration values:
CUE_LINEAR
CUE_EXP
CUE_EXP2
NUM_CUE_MODES

Definition at line 108 of file DisplayDevice.h.

enum DisplayDevice::CursorCodes

enum for cursor types.

Enumeration values:
NORMAL_CURSOR
TRANS_CURSOR
SCALE_CURSOR
PICK_CURSOR
WAIT_CURSOR

Definition at line 75 of file DisplayDevice.h.

enum DisplayDevice::DisplayEye

enum for left or right eye.

Enumeration values:
NOSTEREO
LEFTEYE
RIGHTEYE

Definition at line 46 of file DisplayDevice.h.

Referenced by OpenGLRenderer::left, and OpenGLRenderer::right.

enum DisplayDevice::EventCodes

enum for window events.

Enumeration values:
WIN_REDRAW
WIN_LEFT
WIN_MIDDLE
WIN_RIGHT
WIN_WHEELUP
WIN_WHEELDOWN
WIN_MOUSEX
WIN_MOUSEY
WIN_KBD
WIN_KBD_ESCAPE
WIN_KBD_UP
WIN_KBD_DOWN
WIN_KBD_LEFT
WIN_KBD_RIGHT
WIN_KBD_PAGE_UP
WIN_KBD_PAGE_DOWN
WIN_KBD_HOME
WIN_KBD_END
WIN_KBD_INSERT
WIN_KBD_DELETE
WIN_KBD_F1
WIN_KBD_F2
WIN_KBD_F3
WIN_KBD_F4
WIN_KBD_F5
WIN_KBD_F6
WIN_KBD_F7
WIN_KBD_F8
WIN_KBD_F9
WIN_KBD_F10
WIN_KBD_F11
WIN_KBD_F12
WIN_NOEVENT

Definition at line 55 of file DisplayDevice.h.

Referenced by Win32Joystick::check_event, VideoStream::check_event, Spaceball::check_event, Mobile::check_event, and UserKeyEvent::UserKeyEvent.

enum DisplayDevice::Projection

enum for the possible projection modes.

Enumeration values:
PERSPECTIVE
ORTHOGRAPHIC
NUM_PROJECTIONS

Definition at line 126 of file DisplayDevice.h.

Referenced by projection.

enum DisplayDevice::ShadowMode [protected]

Shadow rendering mode enumerations.

Enumeration values:
SHADOWS_OFF
SHADOWS_ON

Definition at line 114 of file DisplayDevice.h.


Constructor & Destructor Documentation

DisplayDevice::DisplayDevice ( const char * )

DisplayDevice::~DisplayDevice ( void ) [virtual]

Definition at line 136 of file DisplayDevice.C.

References name, and set_stereo_mode.


Member Function Documentation

int DisplayDevice::aa_available ( void ) [inline]

function for antialiasing control.

Definition at line 424 of file DisplayDevice.h.

References aaAvailable.

Referenced by VMDApp::display_set_aa, and MainFltkMenu::MainFltkMenu.

int DisplayDevice::aa_enabled ( void ) [inline]

function for antialiasing control.

Definition at line 425 of file DisplayDevice.h.

References aaEnabled.

Referenced by py_get, and text_cmd_display.

void DisplayDevice::aa_off ( void ) [virtual]

function for antialiasing control.

Reimplemented in OpenGLRenderer.

Definition at line 304 of file DisplayDevice.C.

Referenced by VMDApp::display_set_aa.

void DisplayDevice::aa_on ( void ) [virtual]

function for antialiasing control.

Reimplemented in OpenGLRenderer.

Definition at line 303 of file DisplayDevice.C.

Referenced by VMDApp::display_set_aa.

void DisplayDevice::abs_screen_loc_2D ( float * ,
float *
) [virtual]

return absolute 2D screen coordinates, given 2D world coordinates.

Reimplemented in OpenGLRenderer.

Definition at line 315 of file DisplayDevice.C.

void DisplayDevice::abs_screen_loc_3D ( float * ,
float *
) [virtual]

return normalized absolut 3D screen coordinates, given 3D world coordinates. (i.e the second parameter will return a 3D coordinate, with a normalized z).

Reimplemented in OpenGLRenderer.

Definition at line 309 of file DisplayDevice.C.

Referenced by pick.

void DisplayDevice::abs_screen_pos ( float & x,
float & y
) [inline]

convert 2D relative screen coords into absolute coords.

Definition at line 758 of file DisplayDevice.h.

References x, xOrig, xSize, y, yOrig, and ySize.

Referenced by pick.

float DisplayDevice::addto_far_clip ( float ac ) [inline]

routines to deal with the clipping planes and eye position.

Definition at line 330 of file DisplayDevice.h.

References farClip, and set_far_clip.

Referenced by VMDApp::display_set_farclip.

float DisplayDevice::addto_near_clip ( float ac ) [inline]

routines to deal with the clipping planes and eye position.

Definition at line 329 of file DisplayDevice.h.

References nearClip, and set_near_clip.

Referenced by VMDApp::display_set_nearclip.

int DisplayDevice::ao_enabled ( void ) [inline]

float DisplayDevice::aspect ( void ) [inline]

routines to deal with the clipping planes and eye position.

Definition at line 325 of file DisplayDevice.h.

References Aspect.

Referenced by FPS::prepare, Axes::prepare, FileRenderer::set_aspectratio, and set_screen_pos.

int DisplayDevice::background_mode ( void ) [inline]

return active background mode.

Definition at line 780 of file DisplayDevice.h.

References backgroundmode.

int DisplayDevice::cache_mode ( void ) [inline]

return current caching mode.

Definition at line 607 of file DisplayDevice.h.

References cacheMode.

Referenced by text_cmd_display.

const char* DisplayDevice::cache_name ( int n ) [inline]

return caching name string, if possible.

Definition at line 613 of file DisplayDevice.h.

References cacheModes, cacheNames, and n.

Referenced by VMDApp::display_set_cachemode, MainFltkMenu::MainFltkMenu, and text_cmd_display.

void DisplayDevice::calc_eyedir ( void ) [protected]

calculate eyeSepDir, based on up vector and look vector eyeSepDir = 1/2 * eyeSep * (lookdir x updir) / mag(lookdir x updir)

Definition at line 190 of file DisplayDevice.C.

References eyeDir, eyeSep, eyeSepDir, and upDir.

Referenced by DisplayDevice, set_eye_dist, set_eye_up, and set_eyesep.

void DisplayDevice::calc_frustum ( void ) [protected]

calculate the position of the near frustum plane, based on curr values of Aspect, vSize, zDist, nearClip and eyePosition

Definition at line 160 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.

void DisplayDevice::clear ( void ) [virtual]

erase the device.

Reimplemented in OpenGLRenderer.

Definition at line 366 of file DisplayDevice.C.

float DisplayDevice::clip_width ( void ) const [inline]

routines to deal with the clipping planes and eye position.

Definition at line 328 of file DisplayDevice.h.

References farClip, and nearClip.

const char* DisplayDevice::cue_mode_name ( int i ) const [inline]

routines to deal with depth cueing / fog.

Definition at line 375 of file DisplayDevice.h.

References NULL, and NUM_CUE_MODES.

int DisplayDevice::cueing_available ( void ) [inline]

routines to deal with depth cueing / fog.

Definition at line 370 of file DisplayDevice.h.

References cueingAvailable.

Referenced by VMDApp::display_set_depthcue, and MainFltkMenu::MainFltkMenu.

int DisplayDevice::cueing_enabled ( void ) [inline]

routines to deal with depth cueing / fog.

Definition at line 371 of file DisplayDevice.h.

References cueingEnabled.

Referenced by py_get, and text_cmd_display.

virtual void DisplayDevice::cueing_off ( void ) [inline, virtual]

routines to deal with depth cueing / fog.

Reimplemented in OpenGLRenderer.

Definition at line 363 of file DisplayDevice.h.

References _needRedraw, cueingAvailable, and cueingEnabled.

Referenced by VMDApp::display_set_depthcue.

virtual void DisplayDevice::cueing_on ( void ) [inline, virtual]

routines to deal with depth cueing / fog.

Reimplemented in OpenGLRenderer.

Definition at line 355 of file DisplayDevice.h.

References _needRedraw, cueingAvailable, and cueingEnabled.

Referenced by VMDApp::display_set_depthcue.

int DisplayDevice::culling_available ( void ) [inline]

virtual function for controlling backface culling.

Definition at line 433 of file DisplayDevice.h.

References cullingAvailable.

Referenced by VMDApp::display_set_culling, and MainFltkMenu::MainFltkMenu.

int DisplayDevice::culling_enabled ( void ) [inline]

virtual function for controlling backface culling.

Definition at line 434 of file DisplayDevice.h.

References cullingEnabled.

Referenced by py_get, and text_cmd_display.

void DisplayDevice::culling_off ( void ) [virtual]

virtual function for controlling backface culling.

Reimplemented in OpenGLRenderer.

Definition at line 306 of file DisplayDevice.C.

Referenced by VMDApp::display_set_culling.

void DisplayDevice::culling_on ( void ) [virtual]

virtual function for controlling backface culling.

Reimplemented in OpenGLRenderer.

Definition at line 305 of file DisplayDevice.C.

Referenced by VMDApp::display_set_culling.

void DisplayDevice::distance_to_screen ( float zd ) [inline]

Definition at line 514 of file DisplayDevice.h.

References _needRedraw, calc_frustum, and zDist.

float DisplayDevice::distance_to_screen ( void ) [inline]

return/set the distance from the origin to the screen.

Definition at line 513 of file DisplayDevice.h.

References zDist.

Referenced by VMDApp::display_get_screen_distance, VMDApp::display_set_screen_distance, py_get, and text_cmd_display.

virtual int DisplayDevice::do_activate_light ( int ,
int
) [inline, virtual]

Reimplemented in FileRenderer.

Definition at line 196 of file DisplayDevice.h.

Referenced by Scene::draw.

virtual int DisplayDevice::do_define_light ( int ,
float * ,
float *
) [inline, virtual]

virtual routines to deal with light sources, return success/failure.

Reimplemented in FileRenderer.

Definition at line 195 of file DisplayDevice.h.

Referenced by Scene::draw.

virtual void DisplayDevice::do_reposition_window ( int xpos,
int ypos
) [inline, protected, virtual]

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 228 of file DisplayDevice.h.

Referenced by reposition_window.

void DisplayDevice::do_resize_window ( int w,
int h
) [protected, virtual]

Do device-specific resizing or positioning of window

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 264 of file DisplayDevice.C.

References set_screen_pos, xSize, and ySize.

Referenced by resize_window.

virtual void DisplayDevice::do_use_colors ( ) [inline, protected, virtual]

Reimplemented in FileRenderer.

Definition at line 105 of file DisplayDevice.h.

Referenced by use_colors.

int DisplayDevice::dof_enabled ( void ) [inline]

virtual int DisplayDevice::drawpixels_rgba4u ( unsigned char * rgba,
int & x,
int & y
) [inline, virtual]

virtual routine for drawing the screen from a packed RGBA array.

Reimplemented in OpenGLDisplayDevice.

Definition at line 805 of file DisplayDevice.h.

References x, and y.

Referenced by VideoStream::check_event.

float DisplayDevice::eye_dist ( void ) const [inline]

return focal length.

Definition at line 689 of file DisplayDevice.h.

References eyeDist.

Referenced by py_get, and text_cmd_display.

float DisplayDevice::eyesep ( void ) const [inline]

return eye separation.

Definition at line 704 of file DisplayDevice.h.

References eyeSep.

Referenced by py_get, text_cmd_display, and RayShadeDisplayDevice::write_header.

float DisplayDevice::far_clip ( void ) const [inline]

routines to deal with the clipping planes and eye position.

Definition at line 327 of file DisplayDevice.h.

References farClip.

Referenced by py_get, py_set, and text_cmd_display.

virtual void DisplayDevice::find_3D_from_2D ( const float * ,
const float * ,
float *
) [inline, virtual]

Reimplemented in OpenGLRenderer.

Definition at line 766 of file DisplayDevice.h.

Referenced by PickModeForce::get_force, Stage::pick_move, and Axes::pick_move.

void DisplayDevice::find_instance_images ( const VMDDisplayList * ,
) [protected]

Find transformations corresponding to the list of active molecule instances specified in the given display list. Append these transformations to the given array.

Definition at line 444 of file DisplayDevice.C.

References ResizeArray::append, INSTANCE_NONE, INSTANCE_NOSELF, VMDDisplayList::instances, VMDDisplayList::instanceset, ResizeArray::num, and ResizeArray< Matrix4 >::num.

Referenced by pick, PSDisplayDevice::render, and FileRenderer::render.

void DisplayDevice::find_pbc_cells ( const VMDDisplayList * ,
ResizeArray< int > &
) [protected]

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.

Definition at line 417 of file DisplayDevice.C.

References ResizeArray::append3, VMDDisplayList::npbc, VMDDisplayList::pbc, PBC_NONE, PBC_NOSELF, PBC_OPX, PBC_OPY, PBC_OPZ, PBC_X, PBC_Y, and PBC_Z.

Referenced by find_pbc_images, and pick.

void DisplayDevice::find_pbc_images ( const VMDDisplayList * ,
) [protected]

Find transformations corresponding to the periodic boundary conditions specified in the given display list. Append these transformations to the given array.

Definition at line 394 of file DisplayDevice.C.

References ResizeArray::append, find_pbc_cells, mat, Matrix4::multmatrix, ResizeArray::num, VMDDisplayList::pbc, PBC_NONE, VMDDisplayList::transX, VMDDisplayList::transXinv, VMDDisplayList::transY, VMDDisplayList::transYinv, VMDDisplayList::transZ, and VMDDisplayList::transZinv.

Referenced by pick, PSDisplayDevice::render, and FileRenderer::render.

virtual int DisplayDevice::forced_stereo_draws ( void ) [inline, virtual]

whether we must force mono draws in stereo or not.

Reimplemented in OpenGLRenderer.

Definition at line 586 of file DisplayDevice.h.

Referenced by Scene::draw.

float DisplayDevice::get_ao_ambient ( ) const [inline]

float DisplayDevice::get_ao_direct ( ) const [inline]

float DisplayDevice::get_cue_density ( ) const [inline]

float DisplayDevice::get_cue_end ( ) const [inline]

const char* DisplayDevice::get_cue_mode ( ) const [inline]

routines to deal with depth cueing / fog.

Definition at line 373 of file DisplayDevice.h.

References cueMode.

Referenced by text_cmd_display.

float DisplayDevice::get_cue_start ( ) const [inline]

float DisplayDevice::get_dof_fnumber ( ) const [inline]

float DisplayDevice::get_dof_focal_dist ( ) const [inline]

int DisplayDevice::get_eye_dir ( float * dir ) [inline]

get eye direction.

Definition at line 666 of file DisplayDevice.h.

References eyeDir, and vec_copy.

Referenced by text_cmd_display.

int DisplayDevice::get_eye_pos ( float * pos ) [inline]

get eye position.

Definition at line 651 of file DisplayDevice.h.

References eyePos, and vec_copy.

Referenced by text_cmd_display.

int DisplayDevice::get_eye_up ( float * updir ) [inline]

query the eye up direction.

Definition at line 682 of file DisplayDevice.h.

References upDir, and vec_copy.

Referenced by text_cmd_display.

virtual int DisplayDevice::get_num_processes ( ) [inline, virtual]

return the number of display processes.

Definition at line 86 of file DisplayDevice.h.

References num_display_processes.

Referenced by VMDApp::VMDinit.

const char* DisplayDevice::get_projection ( ) const [inline]

Definition at line 727 of file DisplayDevice.h.

Referenced by py_get, and text_cmd_display.

virtual int DisplayDevice::init ( int argc,
char ** argv,
VMDApp * app,
int * size,
int * loc
) [inline, virtual]

do actual window construction here. Return true if the window was successfully created; false if not.

Reimplemented in OpenGLDisplayDevice.

Definition at line 257 of file DisplayDevice.h.

References NULL, resize_window, and size.

Referenced by VMDApp::VMDinit.

virtual int DisplayDevice::is_renderer_process ( ) [inline, virtual]

Definition at line 87 of file DisplayDevice.h.

References renderer_process.

Referenced by Scene::draw, FreeVRScene::draw, and CaveScene::draw.

void DisplayDevice::left ( void ) [virtual]

ready to draw left eye.

Reimplemented in OpenGLRenderer.

Definition at line 367 of file DisplayDevice.C.

References LEFTEYE, and whichEye.

Referenced by Scene::draw, PickList::pick_check, PickList::pick_end, PickList::pick_move, PickList::pick_start, and OpenGLRenderer::set_persp.

void DisplayDevice::loadmatrix ( const Matrix4 & ) [virtual]

replace transformation matrix.

Reimplemented in OpenGLRenderer.

Definition at line 352 of file DisplayDevice.C.

References Stack< Matrix4 >::top, and transMat.

void DisplayDevice::multmatrix ( const Matrix4 & ) [virtual]

multiply transformation matrix.

Reimplemented in FileRenderer.

Definition at line 357 of file DisplayDevice.C.

References Stack< Matrix4 >::top, and transMat.

float DisplayDevice::near_clip ( void ) const [inline]

routines to deal with the clipping planes and eye position.

Definition at line 326 of file DisplayDevice.h.

References nearClip.

Referenced by py_get, py_set, and text_cmd_display.

int DisplayDevice::needRedraw ( void ) const [inline]

display state has changed, requiring a redraw.

Definition at line 79 of file DisplayDevice.h.

References _needRedraw.

Referenced by VMDApp::VMDupdate.

void DisplayDevice::normal ( void ) [virtual]

ready to draw non-stereo.

Reimplemented in CaveDisplayDevice.

Definition at line 373 of file DisplayDevice.C.

References NOSTEREO, and whichEye.

Referenced by Scene::draw, and OpenGLRenderer::set_persp.

int DisplayDevice::num_cache_modes ( void ) [inline]

number of different caching modes supported ... 0 means 'off'.

Definition at line 610 of file DisplayDevice.h.

References cacheModes.

Referenced by VMDApp::display_set_cachemode, MainFltkMenu::MainFltkMenu, and text_cmd_display.

int DisplayDevice::num_cue_modes ( ) const [inline]

routines to deal with depth cueing / fog.

Definition at line 374 of file DisplayDevice.h.

References NUM_CUE_MODES.

int DisplayDevice::num_projections ( ) const [inline]

get/change the viewing matrix.

Definition at line 722 of file DisplayDevice.h.

References NUM_PROJECTIONS.

Referenced by text_cmd_display.

int DisplayDevice::num_render_modes ( void ) [inline]

number of different rendering modes supported ... 0 means 'normal'.

Definition at line 628 of file DisplayDevice.h.

References renderModes.

Referenced by VMDApp::display_set_rendermode, MainFltkMenu::MainFltkMenu, and text_cmd_display.

int DisplayDevice::num_stereo_modes ( void ) [inline]

number of different stereo modes supported ... 0 means no stereo.

Definition at line 589 of file DisplayDevice.h.

References stereoModes.

Referenced by VMDApp::display_set_stereo, MainFltkMenu::MainFltkMenu, py_stereomodes, and text_cmd_display.

DisplayDevice & DisplayDevice::operator= ( DisplayDevice & )

int DisplayDevice::pick ( int ,
const float * ,
const VMDDisplayList * ,
float & ,
int * ,
float window_size
) [virtual]

int DisplayDevice::prepare3D ( int = TRUE ) [virtual]

ready to draw 3D.

Reimplemented in FileRenderer.

Definition at line 365 of file DisplayDevice.C.

Referenced by VideoStream::check_event, and Scene::draw.

virtual int DisplayDevice::prepareOpaque ( void ) [inline, virtual]

draw opaque objects.

Reimplemented in OpenGLRenderer.

Definition at line 789 of file DisplayDevice.h.

Referenced by Scene::draw.

virtual int DisplayDevice::prepareTrans ( void ) [inline, virtual]

draw transparent objects.

Reimplemented in OpenGLRenderer.

Definition at line 790 of file DisplayDevice.h.

Referenced by Scene::draw.

Projection DisplayDevice::projection ( ) const [inline]

const char* DisplayDevice::projection_name ( int i ) const [inline]

Definition at line 723 of file DisplayDevice.h.

References NULL, and NUM_PROJECTIONS.

Referenced by text_cmd_display.

void DisplayDevice::queue_events ( void ) [virtual]

queue the standard events (need only be called once ... but this is not done automatically by the window because it may not be necessary or even wanted)

Reimplemented in OpenGLDisplayDevice.

Definition at line 277 of file DisplayDevice.C.

Referenced by Mouse::Mouse, and VMDApp::VMDinit.

int DisplayDevice::read_event ( long & ,
long &
) [virtual]

read the next event ... returns an event type (one of the above ones), and a value. Returns success, and sets arguments. NOTE: THIS SHOULD NOT BLOCK ... IT SHOUULD RETURN FALSE IF NO EVENT TO READ.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 281 of file DisplayDevice.C.

Referenced by Mouse::check_event.

unsigned char * DisplayDevice::readpixels_rgb3u ( int & x,
int & y
) [virtual]

virtual routine for capturing the screen to a packed RGB array.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 380 of file DisplayDevice.C.

References NULL, x, and y.

Referenced by SnapshotDisplayDevice::close_file, and text_cmd_tkrender.

unsigned char * DisplayDevice::readpixels_rgba4u ( int & x,
int & y
) [virtual]

virtual routine for capturing the screen to a packed RGBA array.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 387 of file DisplayDevice.C.

References NULL, x, and y.

Referenced by VideoStream::check_event, and VMDApp::VMDupdate.

virtual void DisplayDevice::rel_screen_pos ( float & x,
float & y
) [inline, virtual]

convert 2D absolute screen coords into relative coords, 0 ... 1.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 752 of file DisplayDevice.h.

References x, xOrig, xSize, y, yOrig, and ySize.

Referenced by FltkOpenGLDisplayDevice::rel_screen_pos.

virtual void DisplayDevice::render ( const VMDDisplayList * ) [inline, virtual]

process list of draw commands.

Reimplemented in CaveDisplayDevice.

Definition at line 809 of file DisplayDevice.h.

References _needRedraw.

Referenced by Displayable::draw.

virtual void DisplayDevice::render_done ( void ) [inline, virtual]

Reimplemented in OpenGLRenderer.

Definition at line 811 of file DisplayDevice.h.

Referenced by Scene::draw, and Scene::filedraw.

int DisplayDevice::render_mode ( void ) [inline]

return current rendering mode.

Definition at line 625 of file DisplayDevice.h.

References renderMode.

Referenced by text_cmd_display.

const char* DisplayDevice::render_name ( int n ) [inline]

return rendering name string, if possible.

Definition at line 631 of file DisplayDevice.h.

References n, renderModes, and renderNames.

Referenced by VMDApp::display_set_rendermode, MainFltkMenu::MainFltkMenu, and text_cmd_display.

void DisplayDevice::reposition_window ( int xpos,
int ypos
) [inline]

Reposition the window.

Definition at line 552 of file DisplayDevice.h.

References do_reposition_window, and screenY.

Referenced by VMDApp::display_set_position.

void DisplayDevice::reshape ( void ) [virtual]

refresh device after change.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 377 of file DisplayDevice.C.

Referenced by OpenGLRenderer::set_render_mode, and OpenGLRenderer::set_stereo_mode.

void DisplayDevice::resize_window ( int w,
int h
) [inline]

Resize the window.

Definition at line 546 of file DisplayDevice.h.

References do_resize_window.

Referenced by VideoStream::check_event, VMDApp::display_set_size, init, and VideoStream::VideoStream.

void DisplayDevice::right ( void ) [virtual]

ready to draw right eye.

Reimplemented in OpenGLRenderer.

Definition at line 370 of file DisplayDevice.C.

References RIGHTEYE, and whichEye.

Referenced by Scene::draw, and OpenGLRenderer::set_persp.

void DisplayDevice::right_eye_dir ( float & x,
float & y,
float & z
) const [inline]

find the direction to the right eye position.

Definition at line 717 of file DisplayDevice.h.

References eyeSepDir, x, y, and z.

void DisplayDevice::screen_height ( float vs ) [inline]

Definition at line 522 of file DisplayDevice.h.

References _needRedraw, calc_frustum, and vSize.

float DisplayDevice::screen_height ( void ) [inline]

return the height of the screen.

Definition at line 521 of file DisplayDevice.h.

References vSize.

Referenced by VMDApp::display_get_screen_height, VMDApp::display_set_screen_height, py_get, and text_cmd_display.

int DisplayDevice::set_ao_ambient ( float a ) [inline]

routines for controlling ambient occlusion rendering.

Definition at line 465 of file DisplayDevice.h.

References _needRedraw, and aoAmbient.

Referenced by VMDApp::display_set_ao_ambient.

int DisplayDevice::set_ao_direct ( float d ) [inline]

routines for controlling ambient occlusion rendering.

Definition at line 472 of file DisplayDevice.h.

References _needRedraw, and aoDirect.

Referenced by VMDApp::display_set_ao_direct.

int DisplayDevice::set_ao_mode ( int onoff ) [inline]

routines for controlling ambient occlusion rendering.

Definition at line 454 of file DisplayDevice.h.

References _needRedraw, and aoEnabled.

Referenced by VMDApp::display_set_ao.

virtual void DisplayDevice::set_backgradient ( const float * ,
const float *
) [inline, virtual]

set gradient colors.

Reimplemented in FileRenderer.

Definition at line 782 of file DisplayDevice.h.

Referenced by Scene::draw.

virtual void DisplayDevice::set_background ( const float * ) [inline, virtual]

set main background color.

Reimplemented in FileRenderer.

Definition at line 781 of file DisplayDevice.h.

Referenced by Scene::draw.

void DisplayDevice::set_background_mode ( int newmode ) [inline]

set display background type.

Definition at line 779 of file DisplayDevice.h.

References backgroundmode.

Referenced by Scene::draw.

void DisplayDevice::set_cache_mode ( int = 0 ) [virtual]

change to a different caching mode (0 means 'off').

Reimplemented in OpenGLRenderer.

Definition at line 332 of file DisplayDevice.C.

References cacheMode.

Referenced by VMDApp::display_set_cachemode.

int DisplayDevice::set_cue_density ( float d ) [inline]

routines to deal with depth cueing / fog.

Definition at line 411 of file DisplayDevice.h.

References _needRedraw, and cueDensity.

Referenced by VMDApp::depthcue_set_density.

float DisplayDevice::set_cue_end ( float e ) [inline]

routines to deal with depth cueing / fog.

Definition at line 401 of file DisplayDevice.h.

References _needRedraw, cueEnd, and cueStart.

Referenced by VMDApp::depthcue_set_end.

int DisplayDevice::set_cue_mode ( const char * mode ) [inline]

routines to deal with depth cueing / fog.

Definition at line 379 of file DisplayDevice.h.

References _needRedraw, cueMode, NUM_CUE_MODES, and strupcmp.

Referenced by VMDApp::depthcue_set_mode.

float DisplayDevice::set_cue_start ( float s ) [inline]

routines to deal with depth cueing / fog.

Definition at line 391 of file DisplayDevice.h.

References _needRedraw, and cueStart.

Referenced by VMDApp::depthcue_set_start.

void DisplayDevice::set_cursor ( int ) [virtual]

set the Nth cursor shape as the current one. If no arg given, the default shape (n=0) is used.

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 300 of file DisplayDevice.C.

Referenced by Mouse::Mouse, and Mouse::move_mode.

int DisplayDevice::set_dof_fnumber ( float f ) [inline]

routines for controlling depth of field rendering.

Definition at line 493 of file DisplayDevice.h.

References _needRedraw, and dofFNumber.

Referenced by VMDApp::display_set_dof_fnumber.

int DisplayDevice::set_dof_focal_dist ( float d ) [inline]

routines for controlling depth of field rendering.

Definition at line 500 of file DisplayDevice.h.

References _needRedraw, and dofFocalDist.

Referenced by VMDApp::display_set_dof_focal_dist.

int DisplayDevice::set_dof_mode ( int onoff ) [inline]

routines for controlling depth of field rendering.

Definition at line 482 of file DisplayDevice.h.

References _needRedraw, and dofEnabled.

Referenced by VMDApp::display_set_dof.

int DisplayDevice::set_eye_defaults ( void )

set default eye position, orientation information.

Definition at line 141 of file DisplayDevice.C.

References eyePos, set_eye_dir, set_eye_pos, set_eye_up, and vec_scale.

int DisplayDevice::set_eye_dir ( float * dir ) [inline]

set eye direction.

Definition at line 658 of file DisplayDevice.h.

References _needRedraw, eyeDir, and vec_copy.

Referenced by DisplayDevice, set_eye_defaults, and text_cmd_display.

int DisplayDevice::set_eye_dist ( float flen ) [inline]

change focal length; this means adjusting eyeDir and updating eyeDist accordingly (eyeDist is just norm(eyeDir)).

Definition at line 693 of file DisplayDevice.h.

References _needRedraw, calc_eyedir, eyeDir, and eyeDist.

Referenced by VMDApp::display_set_focallen.

int DisplayDevice::set_eye_pos ( float * pos ) [inline]

set eye position.

Definition at line 643 of file DisplayDevice.h.

References _needRedraw, eyePos, and vec_copy.

Referenced by set_eye_defaults, and text_cmd_display.

int DisplayDevice::set_eye_up ( float * updir ) [inline]

set the eye up direction.

Definition at line 673 of file DisplayDevice.h.

References _needRedraw, calc_eyedir, upDir, and vec_copy.

Referenced by set_eye_defaults, and text_cmd_display.

float DisplayDevice::set_eyesep ( float newsep ) [inline]

set eye separation.

Definition at line 707 of file DisplayDevice.h.

References _needRedraw, calc_eyedir, and eyeSep.

Referenced by VMDApp::display_set_eyesep.

float DisplayDevice::set_far_clip ( float fc ) [inline]

routines to deal with the clipping planes and eye position.

Definition at line 341 of file DisplayDevice.h.

References _needRedraw, farClip, and nearClip.

Referenced by addto_far_clip, and VMDApp::display_set_farclip.

float DisplayDevice::set_near_clip ( float nc ) [inline]

routines to deal with the clipping planes and eye position.

Definition at line 331 of file DisplayDevice.h.

References _needRedraw, calc_frustum, and nearClip.

Referenced by addto_near_clip, and VMDApp::display_set_nearclip.

int DisplayDevice::set_projection ( const char * proj ) [inline]

Definition at line 728 of file DisplayDevice.h.

References _needRedraw, NUM_PROJECTIONS, and strupcmp.

Referenced by VMDApp::display_set_projection.

void DisplayDevice::set_render_mode ( int = 0 ) [virtual]

change to a different rendering mode (0 means 'normal').

Reimplemented in OpenGLRenderer.

Definition at line 342 of file DisplayDevice.C.

References renderMode.

Referenced by VMDApp::display_set_rendermode.

void DisplayDevice::set_screen_pos ( void ) [inline]

void DisplayDevice::set_screen_pos ( float asp ) [inline]

c) just specify aspect ratio.

Definition at line 540 of file DisplayDevice.h.

References set_screen_pos, vSize, and zDist.

void DisplayDevice::set_screen_pos ( float vs,
float zd
) [inline]

b) have device provide aspect ratio.

Definition at line 537 of file DisplayDevice.h.

References aspect, and set_screen_pos.

void DisplayDevice::set_screen_pos ( float vsize,
float zdist,
float asp
) [inline]

a) specify aspect ratio.

Definition at line 531 of file DisplayDevice.h.

References Aspect, calc_frustum, vSize, and zDist.

int DisplayDevice::set_shadow_mode ( int onoff ) [inline]

routines for controlling shadow rendering.

Definition at line 440 of file DisplayDevice.h.

References _needRedraw, and shadowEnabled.

Referenced by VMDApp::display_set_shadows.

void DisplayDevice::set_stereo_mode ( int = 0 ) [virtual]

change to a different stereo mode (0 means 'off').

Reimplemented in CaveDisplayDevice.

Definition at line 322 of file DisplayDevice.C.

References inStereo.

Referenced by VMDApp::display_set_stereo, and ~DisplayDevice.

void DisplayDevice::set_stereo_swap ( int onoff ) [inline]

swap left/right eyes when rendering in stereo (0 means not swapped).

Definition at line 577 of file DisplayDevice.h.

References _needRedraw, and stereoSwap.

Referenced by VMDApp::display_set_stereo_swap.

int DisplayDevice::shadows_enabled ( void ) [inline]

int DisplayDevice::shift_state ( void ) [virtual]

virtual int DisplayDevice::spaceball ( int * ,
int * ,
int * ,
int * ,
int * ,
int * ,
int *
) [inline, virtual]

return the shift state (ORed enums).

get the current state of the Spaceball if one is available returns rx ry rz, tx ty tz, buttons

Reimplemented in FltkOpenGLDisplayDevice.

Definition at line 309 of file DisplayDevice.h.

Referenced by Spaceball::check_event.

int DisplayDevice::stereo_mode ( void ) [inline]

current stereo mode ... 0 means non-stereo, others device-specific.

Definition at line 574 of file DisplayDevice.h.

References inStereo.

Referenced by Scene::draw, py_get, text_cmd_display, and RayShadeDisplayDevice::write_header.

const char* DisplayDevice::stereo_name ( int n ) [inline]

return stereo name string, if possible.

Definition at line 592 of file DisplayDevice.h.

References n, stereoModes, and stereoNames.

Referenced by VMDApp::display_set_stereo, MainFltkMenu::MainFltkMenu, py_get, py_stereomodes, and text_cmd_display.

int DisplayDevice::stereo_swap ( void ) [inline]

current stereo swap mode ... 0 means not swapped.

Definition at line 583 of file DisplayDevice.h.

References stereoSwap.

Referenced by text_cmd_display.

virtual int DisplayDevice::supports_gui ( ) [inline, virtual]

Does this display device support GUI's? The default stub display does not.

Reimplemented in OpenGLPbufferDisplayDevice.

Definition at line 269 of file DisplayDevice.h.

Referenced by VMDApp::activate_menus, VMDApp::display_titlescreen, VMDApp::VMDinit, VMDApp::VMDupdate, OptiXDisplayDevice::write_trailer, and VMDApp::~VMDApp.

void DisplayDevice::update ( int = TRUE ) [virtual]

void DisplayDevice::use_colors ( const float * c ) [inline]

Use this for colors.

Definition at line 203 of file DisplayDevice.h.

References colorData, and do_use_colors.

Referenced by Scene::draw, and Scene::filedraw.

int DisplayDevice::x ( void ) [virtual]

int DisplayDevice::y ( void ) [virtual]

Member Data Documentation

int DisplayDevice::_needRedraw

int DisplayDevice::aaAvailable [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 93 of file DisplayDevice.h.

Referenced by aa_available, OpenGLRenderer::aa_off, OpenGLRenderer::aa_on, DisplayDevice, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, FreeVRDisplayDevice::FreeVRDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

int DisplayDevice::aaEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 94 of file DisplayDevice.h.

Referenced by aa_enabled, OpenGLRenderer::aa_off, OpenGLRenderer::aa_on, DisplayDevice, and OpenGLRenderer::enable_stencil_stereo.

int DisplayDevice::aaPrevious [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 96 of file DisplayDevice.h.

Referenced by DisplayDevice, and OpenGLRenderer::enable_stencil_stereo.

float DisplayDevice::aoAmbient [protected]

AO ambient lighting factor.

Definition at line 117 of file DisplayDevice.h.

Referenced by DisplayDevice, get_ao_ambient, operator=, and set_ao_ambient.

float DisplayDevice::aoDirect [protected]

AO direct lighting rescaling factor.

Definition at line 118 of file DisplayDevice.h.

Referenced by DisplayDevice, get_ao_direct, operator=, and set_ao_direct.

int DisplayDevice::aoEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 95 of file DisplayDevice.h.

Referenced by ao_enabled, DisplayDevice, operator=, and set_ao_mode.

float DisplayDevice::Aspect [protected]

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.

Definition at line 157 of file DisplayDevice.h.

Referenced by aspect, calc_frustum, operator=, PSDisplayDevice::render_done, OpenGLRenderer::set_persp, set_screen_pos, X3DDisplayDevice::write_header, RenderManDisplayDevice::write_header, R3dDisplayDevice::write_header, POV3DisplayDevice::write_header, LibGelatoDisplayDevice::write_header, and GelatoDisplayDevice::write_header.

int DisplayDevice::backgroundmode [protected]

int DisplayDevice::cacheMode [protected]

current caching mode.

Definition at line 176 of file DisplayDevice.h.

Referenced by cache_mode, DisplayDevice, OpenGLRenderer::set_cache_mode, and set_cache_mode.

int DisplayDevice::cacheModes [protected]

const char** DisplayDevice::cacheNames [protected]

const float* DisplayDevice::colorData [protected]

cached pointer to color data; must be in shared memory for Cave-like.

Definition at line 104 of file DisplayDevice.h.

Referenced by FileRenderer::do_use_colors, OpenGLRenderer::render, and use_colors.

float DisplayDevice::cpDown [protected]

distances to near frustum base, which defines the view volume.

Definition at line 165 of file DisplayDevice.h.

Referenced by calc_frustum, operator=, and OpenGLRenderer::set_persp.

float DisplayDevice::cpLeft [protected]

distances to near frustum base, which defines the view volume.

Definition at line 165 of file DisplayDevice.h.

Referenced by calc_frustum, operator=, and OpenGLRenderer::set_persp.

float DisplayDevice::cpRight [protected]

distances to near frustum base, which defines the view volume.

Definition at line 165 of file DisplayDevice.h.

Referenced by calc_frustum, operator=, and OpenGLRenderer::set_persp.

float DisplayDevice::cpUp [protected]

distances to near frustum base, which defines the view volume.

Definition at line 165 of file DisplayDevice.h.

Referenced by calc_frustum, operator=, and OpenGLRenderer::set_persp.

float DisplayDevice::cueDensity [protected]

fog density, used for exp/exp2 fog/cueing.

Definition at line 111 of file DisplayDevice.h.

Referenced by DisplayDevice, get_cue_density, operator=, and set_cue_density.

float DisplayDevice::cueEnd [protected]

fog start/end, used for linear fog/cueing.

Definition at line 110 of file DisplayDevice.h.

Referenced by DisplayDevice, get_cue_end, operator=, and set_cue_end.

int DisplayDevice::cueingAvailable [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 93 of file DisplayDevice.h.

Referenced by cueing_available, OpenGLRenderer::cueing_off, cueing_off, OpenGLRenderer::cueing_on, cueing_on, DisplayDevice, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, FreeVRDisplayDevice::FreeVRDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

int DisplayDevice::cueingEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 94 of file DisplayDevice.h.

Referenced by cueing_enabled, OpenGLRenderer::cueing_off, cueing_off, OpenGLRenderer::cueing_on, cueing_on, DisplayDevice, operator=, and POV3DisplayDevice::write_header.

CueMode DisplayDevice::cueMode [protected]

fog/cueing mode.

Definition at line 109 of file DisplayDevice.h.

Referenced by DisplayDevice, get_cue_mode, operator=, and set_cue_mode.

float DisplayDevice::cueStart [protected]

Definition at line 110 of file DisplayDevice.h.

Referenced by DisplayDevice, get_cue_start, operator=, set_cue_end, and set_cue_start.

int DisplayDevice::cullingAvailable [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 93 of file DisplayDevice.h.

Referenced by culling_available, OpenGLRenderer::culling_off, OpenGLRenderer::culling_on, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, FreeVRDisplayDevice::FreeVRDisplayDevice, OpenGLPbufferDisplayDevice::init, and OpenGLDisplayDevice::init.

int DisplayDevice::cullingEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 94 of file DisplayDevice.h.

Referenced by culling_enabled, OpenGLRenderer::culling_off, OpenGLRenderer::culling_on, and DisplayDevice.

int DisplayDevice::cylinderRes [protected]

drawing characteristics ... line style, sphere resolution, etc.

Definition at line 143 of file DisplayDevice.h.

Referenced by DisplayDevice.

int DisplayDevice::dofEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 95 of file DisplayDevice.h.

Referenced by DisplayDevice, dof_enabled, operator=, and set_dof_mode.

float DisplayDevice::dofFNumber [protected]

DoF aperture.

Definition at line 121 of file DisplayDevice.h.

Referenced by DisplayDevice, get_dof_fnumber, operator=, and set_dof_fnumber.

float DisplayDevice::dofFocalDist [protected]

DoF focal plane distance.

Definition at line 122 of file DisplayDevice.h.

Referenced by DisplayDevice, get_dof_focal_dist, operator=, and set_dof_focal_dist.

float DisplayDevice::eyeDir[3] [protected]

float DisplayDevice::eyeDist [protected]

float DisplayDevice::eyePos[3] [protected]

float DisplayDevice::eyeSep [protected]

float DisplayDevice::eyeSepDir[3] [protected]

vector from eye position to right eye magnitude is 1/2 eyeSep.

Definition at line 190 of file DisplayDevice.h.

Referenced by calc_eyedir, operator=, FileRenderer::prepare3D, right_eye_dir, and OpenGLRenderer::set_persp.

float DisplayDevice::farClip [protected]

int DisplayDevice::inStereo [protected]

int DisplayDevice::lineStyle [protected]

drawing characteristics ... line style, sphere resolution, etc.

Reimplemented in FileRenderer.

Definition at line 141 of file DisplayDevice.h.

Referenced by DisplayDevice, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, OpenGLDisplayDevice::init, operator=, and OpenGLRenderer::set_line_style.

int DisplayDevice::lineWidth [protected]

drawing characteristics ... line style, sphere resolution, etc.

Reimplemented in FileRenderer.

Definition at line 141 of file DisplayDevice.h.

Referenced by DisplayDevice, FltkOpenGLDisplayDevice::FltkOpenGLDisplayDevice, OpenGLPbufferDisplayDevice::init, OpenGLDisplayDevice::init, operator=, and OpenGLRenderer::set_line_width.

int DisplayDevice::mouseX [protected]

Mouse X position.

Definition at line 209 of file DisplayDevice.h.

Referenced by DisplayDevice, and x.

int DisplayDevice::mouseY [protected]

mouse Y position.

Definition at line 210 of file DisplayDevice.h.

Referenced by DisplayDevice, and y.

int DisplayDevice::my_depth_sort [protected]

depth-sorting flag for tranparent objects? default is FALSE.

Definition at line 100 of file DisplayDevice.h.

char* DisplayDevice::name

float DisplayDevice::nearClip [protected]

int DisplayDevice::num_display_processes

int DisplayDevice::renderer_process

true of we're a rendering process.

Definition at line 83 of file DisplayDevice.h.

Referenced by DisplayDevice, is_renderer_process, and VMDApp::VMDinit.

int DisplayDevice::renderMode [protected]

current rendering mode.

Definition at line 181 of file DisplayDevice.h.

Referenced by DisplayDevice, render_mode, OpenGLRenderer::set_render_mode, and set_render_mode.

int DisplayDevice::renderModes [protected]

const char** DisplayDevice::renderNames [protected]

int DisplayDevice::screenX [protected]

int DisplayDevice::screenY [protected]

int DisplayDevice::shadowEnabled [protected]

Capability and state flags for antialiasing, depth cueing, backface culling, shadows, ambient occlusion, and depth of field.

Definition at line 95 of file DisplayDevice.h.

Referenced by DisplayDevice, operator=, set_shadow_mode, and shadows_enabled.

int DisplayDevice::sphereMode [protected]

int DisplayDevice::sphereRes [protected]

int DisplayDevice::stereoModes [protected]

const char** DisplayDevice::stereoNames [protected]

int DisplayDevice::stereoSwap [protected]

whether left/right eyes are swapped.

Definition at line 171 of file DisplayDevice.h.

Referenced by DisplayDevice, set_stereo_swap, and stereo_swap.

Stack<Matrix4> DisplayDevice::transMat [protected]

current transformation matrix for the display (NOT the projection matrix).

Reimplemented in FileRenderer.

Definition at line 134 of file DisplayDevice.h.

Referenced by DisplayDevice, loadmatrix, multmatrix, operator=, pick, VRJugglerDisplayDevice::render, FreeVRDisplayDevice::render, CaveDisplayDevice::render, and OpenGLRenderer::update_shader_uniforms.

float DisplayDevice::upDir[3] [protected]

direction which is 'up'.

Definition at line 189 of file DisplayDevice.h.

Referenced by calc_eyedir, DisplayDevice, get_eye_up, operator=, set_eye_up, and OpenGLRenderer::set_persp.

VMDApp* DisplayDevice::vmdapp

float DisplayDevice::vSize [protected]

DisplayEye DisplayDevice::whichEye [protected]

the eye we are currently drawing to.

Definition at line 151 of file DisplayDevice.h.

Referenced by left, normal, operator=, right, and POV3DisplayDevice::write_header.

long DisplayDevice::xOrig

long DisplayDevice::xSize

long DisplayDevice::yOrig

long DisplayDevice::ySize

AltStyle によって変換されたページ (->オリジナル) /