NASA World Wind

gov.nasa.worldwind.render.airspaces
Class BasicAirspaceAttributes

java.lang.Object
  extended by gov.nasa.worldwind.render.airspaces.BasicAirspaceAttributes
All Implemented Interfaces:
AirspaceAttributes

public class BasicAirspaceAttributes
extends Object
implements AirspaceAttributes

A container for common attributes applied to renderable shapes.


Constructor Summary
BasicAirspaceAttributes()
           
BasicAirspaceAttributes(AirspaceAttributes that)
           
BasicAirspaceAttributes(Material material, double opacity)
           
 
Method Summary
 void applyInterior(DrawContext dc, boolean enableMaterial)
           
protected  void applyMaterial(DrawContext dc, Material material, double opacity, boolean enableMaterial)
           
 void applyOutline(DrawContext dc, boolean enableMaterial)
           
 Material getMaterial()
          Get the Material used to draw the shape interior or volume.
 double getOpacity()
          Returns the shape's opacity.
 Material getOutlineMaterial()
          Get the Material used to draw the shape border or outline.
 double getOutlineOpacity()
          Returns the shape's outline or border opacity.
 double getOutlineWidth()
          Get the shape border or outline width in pixels.
 void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject so)
           
 boolean isDrawInterior()
          Determines whether the shape interior or volume is being drawn.
 boolean isDrawOutline()
          Determines whether the shape border or outline is being drawn.
 void restoreState(RestorableSupport rs, RestorableSupport.StateObject so)
           
 void setDrawInterior(boolean state)
          Sets whether the shape interior or volume should be drawn.
 void setDrawOutline(boolean state)
          Sets whether the shape border or outline should be drawn.
 void setMaterial(Material material)
          Sets the Material used to draw the shape interior or volume.
 void setOpacity(double opacity)
          Set the shape's opacity.
 void setOutlineMaterial(Material materal)
          Sets the Material used to draw the shape border or outline.
 void setOutlineOpacity(double opacity)
          Set the shape's outline or border opacity.
 void setOutlineWidth(double width)
          Sets the shape border or outline width in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAirspaceAttributes

public BasicAirspaceAttributes()

BasicAirspaceAttributes

public BasicAirspaceAttributes(AirspaceAttributes that)

BasicAirspaceAttributes

public BasicAirspaceAttributes(Material material,
                               double opacity)
Method Detail

applyInterior

public void applyInterior(DrawContext dc,
                          boolean enableMaterial)
Specified by:
applyInterior in interface AirspaceAttributes

applyMaterial

protected void applyMaterial(DrawContext dc,
                             Material material,
                             double opacity,
                             boolean enableMaterial)

applyOutline

public void applyOutline(DrawContext dc,
                         boolean enableMaterial)
Specified by:
applyOutline in interface AirspaceAttributes

getMaterial

public Material getMaterial()
Get the Material used to draw the shape interior or volume.

Specified by:
getMaterial in interface AirspaceAttributes
Returns:
the Material used to draw the shape interior or volume.

getOpacity

public double getOpacity()
Returns the shape's opacity.

Specified by:
getOpacity in interface AirspaceAttributes
Returns:
the shape's opacity in the range [0, 1], where 0 indicates full transparency and 1 indicates full opacity.

getOutlineMaterial

public Material getOutlineMaterial()
Get the Material used to draw the shape border or outline.

Specified by:
getOutlineMaterial in interface AirspaceAttributes
Returns:
the Material used to draw the shape border or outline.

getOutlineOpacity

public double getOutlineOpacity()
Returns the shape's outline or border opacity.

Specified by:
getOutlineOpacity in interface AirspaceAttributes
Returns:
the shape's outline or borderopacity in the range [0, 1], where 0 indicates full transparency and 1 indicates full opacity.

getOutlineWidth

public double getOutlineWidth()
Get the shape border or outline width in pixels.

Specified by:
getOutlineWidth in interface AirspaceAttributes
Returns:
the shape border or outline width in pixels.

getRestorableState

public void getRestorableState(RestorableSupport rs,
                               RestorableSupport.StateObject so)
Specified by:
getRestorableState in interface AirspaceAttributes

isDrawInterior

public boolean isDrawInterior()
Determines whether the shape interior or volume is being drawn.

Specified by:
isDrawInterior in interface AirspaceAttributes
Returns:
true if the shape interior or volume is being drawn.

isDrawOutline

public boolean isDrawOutline()
Determines whether the shape border or outline is being drawn.

Specified by:
isDrawOutline in interface AirspaceAttributes
Returns:
true if the shape border or outline is being drawn.

restoreState

public void restoreState(RestorableSupport rs,
                         RestorableSupport.StateObject so)
Specified by:
restoreState in interface AirspaceAttributes

setDrawInterior

public void setDrawInterior(boolean state)
Sets whether the shape interior or volume should be drawn.

Specified by:
setDrawInterior in interface AirspaceAttributes
Parameters:
state - true if the shape interior or volume should be drawn.

setDrawOutline

public void setDrawOutline(boolean state)
Sets whether the shape border or outline should be drawn.

Specified by:
setDrawOutline in interface AirspaceAttributes
Parameters:
state - true if the shape border or outline should be drawn.

setMaterial

public void setMaterial(Material material)
Sets the Material used to draw the shape interior or volume.

Specified by:
setMaterial in interface AirspaceAttributes
Parameters:
material - the Material used to draw the shape interior or volume.

setOpacity

public void setOpacity(double opacity)
Set the shape's opacity.

Specified by:
setOpacity in interface AirspaceAttributes
Parameters:
opacity - the shape's opacity in the range [0, 1], where 0 indicates full transparency and 1 indicates full opacity.

setOutlineMaterial

public void setOutlineMaterial(Material materal)
Sets the Material used to draw the shape border or outline.

Specified by:
setOutlineMaterial in interface AirspaceAttributes
Parameters:
materal - the Material used to draw the shape border or outline.

setOutlineOpacity

public void setOutlineOpacity(double opacity)
Set the shape's outline or border opacity.

Specified by:
setOutlineOpacity in interface AirspaceAttributes
Parameters:
opacity - the shape's outline or border opacity in the range [0, 1], where 0 indicates full transparency and 1 indicates full opacity.

setOutlineWidth

public void setOutlineWidth(double width)
Sets the shape border or outline width in pixels.

Specified by:
setOutlineWidth in interface AirspaceAttributes
Parameters:
width - the shape border or outline width in pixels.

NASA World Wind