uavsim.datatypes
Class ArcMathematical

java.lang.Object
  extended by uavsim.datatypes.A_Arc<AngleMathematical>
      extended by uavsim.datatypes.ArcMathematical

public class ArcMathematical
extends A_Arc<AngleMathematical>

Defines an arc formed by two mathematical angles.

Author:
Dan Tappan [23.06.11]

Nested Class Summary
 class ArcMathematical.ArcMathematicalIterator
          Defines the iterator over a mathematical arc.
 
Nested classes/interfaces inherited from class uavsim.datatypes.A_Arc
A_Arc.A_ArcIterator
 
Field Summary
 
Fields inherited from class uavsim.datatypes.A_Arc
_angleEnd, _angleStart
 
Constructor Summary
ArcMathematical(AngleMathematical angleStart, AngleMathematical angleEnd)
          Creates an arc with mathematical angles.
 
Method Summary
 ArcNavigational convertToArcNavigational()
          Converts the arc to use navigational angles.
 double getArcLength(boolean isCounterclockwise)
          Determines the length of the arc from start to end.
 ArcMathematical.ArcMathematicalIterator getIteratorInstance(AngleMathematical step, boolean isCounterclockwise, boolean isInclusiveRange)
          Generates an iterator.
 ArcMathematical getReverse()
          Swaps the start and end angles.
 
Methods inherited from class uavsim.datatypes.A_Arc
getAngleEnd, getAngleStart, getSubarcLength, getSubdivisionCount, isContained, isStartBeforeEnd, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArcMathematical

public ArcMathematical(AngleMathematical angleStart,
                       AngleMathematical angleEnd)
Creates an arc with mathematical angles.

Parameters:
angleStart - - the start angle
angleEnd - - the end angle
Method Detail

convertToArcNavigational

public ArcNavigational convertToArcNavigational()
Converts the arc to use navigational angles.

Returns:
the new arc

getArcLength

public double getArcLength(boolean isCounterclockwise)
Determines the length of the arc from start to end.

Specified by:
getArcLength in class A_Arc<AngleMathematical>
Parameters:
isCounterclockwise - - whether to follow the arc counterclockwise
Returns:
the length

getIteratorInstance

public ArcMathematical.ArcMathematicalIterator getIteratorInstance(AngleMathematical step,
                                                                   boolean isCounterclockwise,
                                                                   boolean isInclusiveRange)
Generates an iterator.

Specified by:
getIteratorInstance in class A_Arc<AngleMathematical>
Parameters:
step - - the step
isCounterclockwise - - whether to follow the arc counterclockwise
isInclusiveRange - - whether to include the end angle in the steps
Returns:
the iterator

getReverse

public ArcMathematical getReverse()
Swaps the start and end angles.

Specified by:
getReverse in class A_Arc<AngleMathematical>
Returns:
the new arc