NASA World Wind

gov.nasa.worldwind.render
Class ConformingEllipse

java.lang.Object
  extended by gov.nasa.worldwind.render.ConformingShape
      extended by gov.nasa.worldwind.render.ConformingEllipse
All Implemented Interfaces:
Disposable, MeasurableArea, MeasurableLength, Movable, Renderable, Restorable
Direct Known Subclasses:
ConformingCircle

public class ConformingEllipse
extends ConformingShape


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.ConformingShape
ConformingShape.CacheKey
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.render.ConformingShape
borderColor, borderWidth, CONFORMINGSHAPE_CACHE_KEY, CONFORMINGSHAPE_CACHE_NAME, drawBorder, drawInterior, fillColor
 
Constructor Summary
ConformingEllipse(LatLon center, double semiMajorAxisLength, double semiMinorAxisLength, Angle orientation)
           
ConformingEllipse(LatLon center, double semiMajorAxisLength, double semiMinorAxisLength, Angle orientation, Color fillColor, Color borderColor)
           
 
Method Summary
protected  void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
           
protected  void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
           
 double getArea(Globe globe)
          Returns the object's area in square meters.
 LatLon getCenter()
           
 double getHeight(Globe globe)
          Returns the latitudanl length of the object in meters.
 double getLength(Globe globe)
          Returns the object's length in meters.
 Angle getOrientation()
           
 double getPerimeter(Globe globe)
          Returns the length of the object's perimeter in meters.
 Position getReferencePosition()
           
 double getSemiMajorAxisLength()
           
 double getSemiMinorAxisLength()
           
 double getWidth(Globe globe)
          Returns the longitudinal length of the object in meters.
protected  void invalidateCache()
           
 void moveTo(Position position)
          Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
protected  void renderBoundary(DrawContext dc, GL gl, boolean knownToBeVisible)
           
protected  boolean renderInterior(DrawContext dc, GL gl)
           
 void setAxisLengths(double majorAxisLength, double minorAxisLength)
           
 void setCenter(LatLon center)
           
 void setOrientation(Angle orientation)
           
 
Methods inherited from class gov.nasa.worldwind.render.ConformingShape
dispose, getBorderColor, getBorderWidth, getInteriorColor, getRestorableState, getUniqueSerialNumber, getUseFrustumCull, isAntiAlias, isDrawBorder, isDrawInterior, isExpired, move, render, restoreState, setAntiAlias, setBorderColor, setBorderWidth, setDrawBorder, setDrawInterior, setInteriorColor, setUseFrustumCull, sizeInBytesOf, updateExpiryCriteria
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformingEllipse

public ConformingEllipse(LatLon center,
                         double semiMajorAxisLength,
                         double semiMinorAxisLength,
                         Angle orientation)

ConformingEllipse

public ConformingEllipse(LatLon center,
                         double semiMajorAxisLength,
                         double semiMinorAxisLength,
                         Angle orientation,
                         Color fillColor,
                         Color borderColor)
Method Detail

doGetRestorableState

protected void doGetRestorableState(RestorableSupport rs,
                                    RestorableSupport.StateObject context)
Overrides:
doGetRestorableState in class ConformingShape

doRestoreState

protected void doRestoreState(RestorableSupport rs,
                              RestorableSupport.StateObject context)
Overrides:
doRestoreState in class ConformingShape

getArea

public double getArea(Globe globe)
Description copied from interface: MeasurableArea
Returns the object's area in square meters. If the object conforms to terrain, the area returned is the surface area of the terrain, including its hillsides and other undulations.

Parameters:
globe - The globe the object is related to.
Returns:
the object's area in square meters. Returns -1 if the object does not form an area due to an insufficient number of vertices or any other condition.

getCenter

public LatLon getCenter()

getHeight

public double getHeight(Globe globe)
Description copied from interface: MeasurableArea
Returns the latitudanl length of the object in meters. The length is the distance from the objects south-most point to its east-most position.

Parameters:
globe - The globe the object is related to.
Returns:
the height of the object in meters.

getLength

public double getLength(Globe globe)
Description copied from interface: MeasurableLength
Returns the object's length in meters. If the object conforms to terrain, the length is that along the terrain, including its hillsides and other undulations.

Parameters:
globe - The globe the object is related to.
Returns:
the object's length in meters.

getOrientation

public Angle getOrientation()

getPerimeter

public double getPerimeter(Globe globe)
Description copied from interface: MeasurableArea
Returns the length of the object's perimeter in meters. If the object conforms to terrain, the perimeter is that along the terrain, including its hillsides and other undulations.

Parameters:
globe - The globe the object is related to.
Returns:
the object's perimeter in meters. Returns -1 if the object does not form an area due to an insufficient number of vertices or any other condition.

getReferencePosition

public Position getReferencePosition()
Specified by:
getReferencePosition in interface Movable
Specified by:
getReferencePosition in class ConformingShape

getSemiMajorAxisLength

public double getSemiMajorAxisLength()

getSemiMinorAxisLength

public double getSemiMinorAxisLength()

getWidth

public double getWidth(Globe globe)
Description copied from interface: MeasurableArea
Returns the longitudinal length of the object in meters. The length is the distance from the object's west-most point to its east-most. If the object is terrain conforming then the

Parameters:
globe - The globe the object is related to.
Returns:
the width of the object in meters.

invalidateCache

protected void invalidateCache()
Specified by:
invalidateCache in class ConformingShape

moveTo

public void moveTo(Position position)
Description copied from interface: Movable
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.

Specified by:
moveTo in interface Movable
Specified by:
moveTo in class ConformingShape
Parameters:
position - the new position of the shape's reference position.

renderBoundary

protected void renderBoundary(DrawContext dc,
                              GL gl,
                              boolean knownToBeVisible)
Specified by:
renderBoundary in class ConformingShape

renderInterior

protected boolean renderInterior(DrawContext dc,
                                 GL gl)
Specified by:
renderInterior in class ConformingShape

setAxisLengths

public void setAxisLengths(double majorAxisLength,
                           double minorAxisLength)

setCenter

public void setCenter(LatLon center)

setOrientation

public void setOrientation(Angle orientation)

NASA World Wind