|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.common.Bounds
edu.unh.sdb.lattice.GBounds
public class GBounds
The GBounds class is meant to represent n-d hypercubes in the data space of a lattice.
Field Summary | |
---|---|
protected float[] |
lower
|
protected float[] |
upper
|
Constructor Summary | |
---|---|
|
GBounds(float[] dimensions)
This constructor takes a single float array that defines the dimensions of a hypercube with lower coordinates at the origin. |
|
GBounds(GBounds bounds)
Construct a copy of the argument bounds. |
protected |
GBounds(int dimensionality)
This constructor just allocates space for the lower and upper arrays. |
|
GBounds(Point dimensions)
This constructor takes a single Point that defines the dimensions of a hypercube with lower coordinates at the origin. |
|
GBounds(Point corner1,
Point corner2)
This constructor takes two corner points (SpaceIDs) that define a hypercube of arbitrary dimensionality. |
Method Summary | |
---|---|
void |
boundingVolume(GBounds db)
Updates this GBounds object to be the bounding volume of this GBounds and the parameter GBounds. |
java.lang.Object |
clone()
Return a copy of this GBounds object |
boolean |
contains(float[] coords)
Returns true if this Bounds contains the coordinates contained in the integer array. |
boolean |
contains(GBounds b2)
Returns true if this Bounds completely contains the argument bounds. |
boolean |
contains(Point id)
Returns true if this Bounds contains the argument Point. |
GBounds |
copy()
Return a copy of this GBounds object |
static GBounds |
copyAndMoveToOrigin(GBounds bounds)
Returns a new GBounds of the same shape as the argument bounds, but moved to the origin. |
GBounds |
copyBounds()
Return a copy of this GBounds object. |
int |
dim()
Return dimensionality of Bounds. |
boolean |
equals(GBounds b)
Return true if parameter is equal to this object, false otherwise. |
float |
getDimension(int axis)
Return the extent of this GBounds along the specified axis. |
Point |
getDimensions()
Return a Point with axis values denoting the size of each corresponding dimension of the GBounds. |
float[] |
getDimensions(float[] coords)
Fill the argument array with coordinate values denoting the size of each corresponding dimension of the GBounds. |
Point |
getLower()
Return an Point representing the upper bounds. |
float[] |
getLowerArray(float[] arr)
Copy the lower bound coordinates into the array argument. |
Point |
getUpper()
Return an Point representing the lower bounds. |
float[] |
getUpperArray(float[] arr)
Copy the upper bound coordinates into the array argument. |
boolean |
intersects(GBounds b2)
Updates this object to be the intersecton of itself with the GBounds argument. |
static void |
main(java.lang.String[] args)
For debugging. |
void |
move(float[] distance)
Translate the GBounds object in space by the coordinates in the integer array argument. |
void |
move(Point distance)
Translate the GBounds object in space by the value of the parameter Point. |
void |
moveTo(float[] location)
Translate the GBounds object in space so that the lower left corner is moved to the coordinates specified int the integer array argument. |
void |
moveTo(Point location)
Translate the GBounds object in space so that the lower left corner is moved to the location specified by the parameter Point. |
void |
moveToOrigin()
Translate this GBounds in space so that the lower point is now at the origin. |
void |
setLower(float[] lower)
Set the lower bounds to the coordinates represented by the integer array argument. |
void |
setLower(Point lower)
Set the lower bounds to the coordinates represented by the Point argument. |
void |
setUpper(float[] upper)
Set the upper bounds to the coordinates represented by the integer array argument. |
void |
setUpper(Point upper)
Set the upper bounds to the coordinates represented by the Point argument. |
java.lang.String |
toString()
Return a String representing the object. |
java.lang.String |
toString(java.lang.String indent)
Return a String representing the object indented by the argument string. |
float |
volume()
Return the total volume of the GBounds as an integer. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected float[] lower
protected float[] upper
Constructor Detail |
---|
public GBounds(Point corner1, Point corner2)
public GBounds(Point dimensions)
public GBounds(float[] dimensions)
public GBounds(GBounds bounds)
protected GBounds(int dimensionality)
Method Detail |
---|
public final GBounds copy()
public GBounds copyBounds()
public java.lang.Object clone()
clone
in class Bounds
public final void setLower(Point lower)
public final void setUpper(Point upper)
public final void setLower(float[] lower)
public final void setUpper(float[] upper)
public final Point getLower()
public final Point getUpper()
public final float[] getLowerArray(float[] arr)
public final float[] getUpperArray(float[] arr)
public final int dim()
dim
in class Bounds
public boolean equals(GBounds b)
public final float volume()
public final Point getDimensions()
public final float[] getDimensions(float[] coords)
public final float getDimension(int axis)
public final void move(Point distance)
public final void move(float[] distance)
public void moveTo(Point location)
public void moveTo(float[] location)
public void moveToOrigin()
public static GBounds copyAndMoveToOrigin(GBounds bounds)
public void boundingVolume(GBounds db)
public boolean intersects(GBounds b2)
public boolean contains(GBounds b2)
public boolean contains(Point id)
public boolean contains(float[] coords)
public java.lang.String toString()
toString
in class Bounds
public java.lang.String toString(java.lang.String indent)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |