Changeset 3057


Ignore:
Timestamp:
08/07/07 14:29:37 (12 years ago)
Author:
curtis
Message:

Add option to toggle stereo displays on or off.

Location:
trunk/loci/visbio/view
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/DisplayManager.java

    r3015 r3057  
    6565  /** String for 3D texturing option. */ 
    6666  public static final String TEXTURE3D = "Use 3D texturing"; 
     67 
     68  /** String for stereo displays option. */ 
     69  public static final String DO_STEREO = "Use stereo displays"; 
    6770 
    6871  /** String for eye separation setting. */ 
     
    269272    om.addBooleanOption("Visualization", TEXTURE3D, '3', 
    270273      "Toggles whether 3D textures are used for volume rendering", true); 
     274    om.addBooleanOption("Visualization", DO_STEREO, 'u', 
     275      "Toggles whether to use stereo displays if available", false); 
    271276    om.addNumericOption("Visualization", EYE_DISTANCE, null, 
    272277      "Adjusts eye separation for stereo displays", DEFAULT_EYE_SEPARATION); 
  • trunk/loci/visbio/view/DisplayWindow.java

    r3015 r3057  
    182182    viewHandler.guessAspect(); 
    183183    refresh(); 
    184     manager.getVisBio().generateEvent(manager, 
     184    getVisBio().generateEvent(manager, 
    185185      "add data object to display", true); 
    186186  } 
     
    190190    transformHandler.removeTransform(trans); 
    191191    refresh(); 
    192     manager.getVisBio().generateEvent(manager, 
     192    getVisBio().generateEvent(manager, 
    193193      "remove data object from display", true); 
    194194  } 
     
    198198    transformHandler.removeAllTransforms(); 
    199199    refresh(); 
    200     manager.getVisBio().generateEvent(manager, 
     200    getVisBio().generateEvent(manager, 
    201201      "remove all data objects from display", true); 
    202202  } 
     
    320320 
    321321    if (display == null) { 
    322       display = DisplayUtil.makeDisplay(name, threeD, STEREO); 
     322      OptionManager om = (OptionManager) 
     323        getVisBio().getManager(OptionManager.class); 
     324      boolean doStereo = ((BooleanOption) 
     325        om.getOption(DisplayManager.DO_STEREO)).getValue(); 
     326      GraphicsConfiguration gc = doStereo ? STEREO : null; 
     327 
     328      om.getOption(DisplayManager.EYE_DISTANCE); 
     329      display = DisplayUtil.makeDisplay(name, threeD, gc); 
    323330      setTransparencyMode(manager.isNiceTransparency()); 
    324331      setTextureMapping(manager.isTextureMapped()); 
     
    361368      // add display controls breakaway window to window manager 
    362369      WindowManager wm = (WindowManager) 
    363         manager.getVisBio().getManager(WindowManager.class); 
     370        getVisBio().getManager(WindowManager.class); 
    364371      wm.addWindow(controls.getWindow()); 
    365372 
Note: See TracChangeset for help on using the changeset viewer.