Ignore:
Timestamp:
01/15/07 15:34:16 (13 years ago)
Author:
curtis
Message:

Add option to disable texture mapping.

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

Legend:

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

    r1989 r2097  
    5353  /** String for nicest transparency option. */ 
    5454  public static final String NICE_ALPHA = "Use nicest transparency"; 
     55 
     56  /** String for texture mapping option. */ 
     57  public static final String TEXTURE_MAP = "Use texture mapping"; 
    5558 
    5659  /** String for 3D texturing option. */ 
     
    150153  } 
    151154 
     155  public boolean isTextureMapped() { 
     156    OptionManager om = (OptionManager) bio.getManager(OptionManager.class); 
     157    BooleanOption opt = (BooleanOption) om.getOption(TEXTURE_MAP); 
     158    return opt.getValue(); 
     159  } 
     160 
    152161  /** Gets whether to use 3D texturing from VisBio options. */ 
    153162  public boolean is3DTextured() { 
     
    250259    om.addBooleanOption("Visualization", NICE_ALPHA, 'n', 
    251260      "Toggles quality of transparency behavior", true); 
     261    om.addBooleanOption("Visualization", TEXTURE_MAP, 't', 
     262      "Toggles whether texture mapping is used for image planes", true); 
    252263    om.addBooleanOption("Visualization", TEXTURE3D, '3', 
    253264      "Toggles whether 3D textures are used for volume rendering", true); 
  • trunk/loci/visbio/view/DisplayWindow.java

    r1989 r2097  
    221221  } 
    222222 
     223  /** Sets wehther texture mapping is enabled. */ 
     224  public void setTextureMapping(boolean textureMapping) { 
     225    try { 
     226      display.getGraphicsModeControl().setTextureEnable(textureMapping); 
     227    } 
     228    catch (VisADException exc) { exc.printStackTrace(); } 
     229    catch (RemoteException exc) { exc.printStackTrace(); } 
     230  } 
     231 
    223232  /** Sets whether volume rendering uses 3D texturing. */ 
    224233  public void set3DTexturing(boolean texture3d) { 
     
    305314      display = DisplayUtil.makeDisplay(name, threeD, STEREO); 
    306315      setTransparencyMode(manager.isNiceTransparency()); 
     316      setTextureMapping(manager.isTextureMapped()); 
    307317      set3DTexturing(manager.is3DTextured()); 
    308318      display.addDisplayListener(this); 
Note: See TracChangeset for help on using the changeset viewer.