uk.ac.leeds.ccg.andyt.vector.geometry
Class Vector_Envelope2D

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
      extended by uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Envelope2D
All Implemented Interfaces:
java.io.Serializable

public class Vector_Envelope2D
extends Vector_AbstractGeometry2D
implements java.io.Serializable

A class for simplifying geometry in 2D. For any AbstractGeometry an Vector_Envelope2D can be retrieved via getEnvelope(). It is to contain the extreme values with respect to the X and Y axes.

See Also:
Serialized Form

Field Summary
 java.math.BigDecimal _xmax
           
 java.math.BigDecimal _xmin
           
 java.math.BigDecimal _ymax
           
 java.math.BigDecimal _ymin
           
 
Fields inherited from class uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
_DecimalPlacePrecision_Integer, _RoundingMode, _Vector_Environment
 
Constructor Summary
Vector_Envelope2D()
          Creates a default Vector_Envelope2D _xmin = new BigDecimal(Long.MAX_VALUE); _xmax = new BigDecimal(Long.MIN_VALUE); _ymin = new BigDecimal(Long.MAX_VALUE); _ymax = new BigDecimal(Long.MIN_VALUE);
Vector_Envelope2D(java.math.BigDecimal x, java.math.BigDecimal y)
           
Vector_Envelope2D(Vector_AbstractGeometry2D aAbstractGeometry2D)
           
Vector_Envelope2D(Vector_AbstractGeometry2D[] aAbstractGeometry2DArray)
           
Vector_Envelope2D(Vector_Envelope2D aEnvelope2D)
           
Vector_Envelope2D(Vector_Point2D aPoint, Vector_Point2D bPoint)
           
 
Method Summary
 void applyDecimalPlacePrecision()
           
 Vector_Envelope2D envelope(Vector_Envelope2D a_Envelope2D)
           
static Vector_Envelope2D envelope(Vector_Envelope2D a_Envelope2D, Vector_Envelope2D b_Envelope2D)
           
 Vector_Envelope2D getEnvelope2D()
           
 boolean getIntersects(java.math.BigDecimal x, java.math.BigDecimal y)
           
 boolean getIntersects(Vector_Envelope2D a_Envelope2D)
          If aEnvelope2D touches, or overlaps then it getIntersects.
 int getIntersects(Vector_LineSegment2D a_LineSegment2D)
           
 boolean getIntersects(Vector_Point2D aPoint)
           
 java.lang.String toString()
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
get_DecimalPlacePrecision, get_RoundingMode, getDefault_RoundingMode, getDefaultDecimalPlacePrecision_int, set_DecimalPlacePrecision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_xmin

public java.math.BigDecimal _xmin

_xmax

public java.math.BigDecimal _xmax

_ymin

public java.math.BigDecimal _ymin

_ymax

public java.math.BigDecimal _ymax
Constructor Detail

Vector_Envelope2D

public Vector_Envelope2D()
Creates a default Vector_Envelope2D _xmin = new BigDecimal(Long.MAX_VALUE); _xmax = new BigDecimal(Long.MIN_VALUE); _ymin = new BigDecimal(Long.MAX_VALUE); _ymax = new BigDecimal(Long.MIN_VALUE);


Vector_Envelope2D

public Vector_Envelope2D(Vector_Envelope2D aEnvelope2D)

Vector_Envelope2D

public Vector_Envelope2D(Vector_AbstractGeometry2D aAbstractGeometry2D)

Vector_Envelope2D

public Vector_Envelope2D(Vector_Point2D aPoint,
                         Vector_Point2D bPoint)

Vector_Envelope2D

public Vector_Envelope2D(java.math.BigDecimal x,
                         java.math.BigDecimal y)

Vector_Envelope2D

public Vector_Envelope2D(Vector_AbstractGeometry2D[] aAbstractGeometry2DArray)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Vector_AbstractGeometry2D

envelope

public static Vector_Envelope2D envelope(Vector_Envelope2D a_Envelope2D,
                                         Vector_Envelope2D b_Envelope2D)

envelope

public Vector_Envelope2D envelope(Vector_Envelope2D a_Envelope2D)

getIntersects

public boolean getIntersects(Vector_Envelope2D a_Envelope2D)
If aEnvelope2D touches, or overlaps then it getIntersects.


getIntersects

public int getIntersects(Vector_LineSegment2D a_LineSegment2D)
Parameters:
a_LineSegment2D -
Returns:
0 if no, 1 if yes, 2 if maybe.

getIntersects

public boolean getIntersects(Vector_Point2D aPoint)

getIntersects

public boolean getIntersects(java.math.BigDecimal x,
                             java.math.BigDecimal y)

getEnvelope2D

public Vector_Envelope2D getEnvelope2D()
Specified by:
getEnvelope2D in class Vector_AbstractGeometry2D

applyDecimalPlacePrecision

public void applyDecimalPlacePrecision()
Specified by:
applyDecimalPlacePrecision in class Vector_AbstractGeometry2D