Class pmr.euclid.Real2Range
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.euclid.Real2Range
java.lang.Object
|
+----pmr.euclid.Status
|
+----pmr.euclid.Real2Range
- public class Real2Range
- extends Status
Real2Range - 2-D double limits
Contains two RealRanges. Can therefore be used to describe 2-dimensional
limits (e.g. axes of graphs, rectangles in graphics, limits of a
molecule, etc.)
Default is two default/invalid RealRange components. Adding points
will create valid ranges.
- Author:
- (C) P. Murray-Rust, 1996
-
Real2Range()
-
-
Real2Range(Real2Range)
- copy constructor
-
Real2Range(RealRange, RealRange)
- initialise with min and max values;
-
add(Real2)
- add a Real2 to a range
-
equals(Real2Range)
-
-
getXRange()
- get xrange
-
getYRange()
- get yrange
-
includes(Real2)
- is an Real2 within a Real2Range?
-
includes(Real2Range)
- is one Real2Range completely within another?
-
intersectionWith(Real2Range)
- intersect two ranges and take the range common to both; return invalid
range if no overlap or either is null/invalid
-
isValid()
- a Real2Range is valid if both its constituent ranges are
-
plus(Real2Range)
- merge two ranges and take the maximum extents
-
toString()
-
Real2Range
public Real2Range()
Real2Range
public Real2Range(RealRange xr,
RealRange yr)
- initialise with min and max values;
Real2Range
public Real2Range(Real2Range r)
- copy constructor
isValid
public boolean isValid()
- a Real2Range is valid if both its constituent ranges are
equals
public boolean equals(Real2Range r2)
plus
public Real2Range plus(Real2Range r2)
- merge two ranges and take the maximum extents
intersectionWith
public Real2Range intersectionWith(Real2Range r2)
- intersect two ranges and take the range common to both; return invalid
range if no overlap or either is null/invalid
getXRange
public RealRange getXRange()
- get xrange
getYRange
public RealRange getYRange()
- get yrange
includes
public boolean includes(Real2 p)
- is an Real2 within a Real2Range?
includes
public boolean includes(Real2Range r)
- is one Real2Range completely within another?
add
public void add(Real2 p)
- add a Real2 to a range
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index