public class GridSpace3D
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
double |
xyRatio |
Constructor and Description |
---|
GridSpace3D()
empty constructor for the GridSpace3D class with coordinates provided
|
GridSpace3D(double lowX,
double highX,
double lowY,
double highY)
constructor for the GridSpace3D class with x, y, z grids provided
|
GridSpace3D(double lowX,
double highX,
double lowY,
double highY,
double lowZ,
double highZ)
standard constructor for the GridSpace3D class with coordinates provided
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
clone the object
|
boolean |
contains(GridSpace3D aSpace)
returns whether the GridSpace3D contains another GridSpace3D
|
boolean |
contains(java.awt.geom.Point2D.Double aPoint)
returns whether the GridSpace3D contains a Point2D
|
boolean |
contains(SpatialVector aVec)
returns whether the GridSpace3D contains a SpatialVector
|
java.awt.Point |
getBinLoc(SpatialVector aVec)
returns whether the GridSpace3D contains a SpatialVector
|
double |
getHighX()
returns the low x value for the Gridpsace3D
|
double |
getHighY()
returns the low x value for the Gridpsace3D
|
double |
getHighZ()
returns the low x value for the Gridpsace3D
|
double |
getLowX()
returns the low x value for the Gridpsace3D
|
double |
getLowY()
returns the low x value for the Gridpsace3D
|
double |
getLowZ()
returns the low x value for the Gridpsace3D
|
int |
getPixelSpaceX()
returns the number of x pixels in screen space
|
int |
getPixelSpaceY()
returns the number of y pixels in screen space
|
int |
getPixelSpaceZ()
returns the number of z pixels in screen space
|
boolean |
getSameXYScale()
x and y Axis measures are at the same scale
|
boolean |
getSameXYZScale()
x, y and z Axis measures are at the same scale
|
boolean |
getXAxisDirection()
returns the directions of the x axis in the gridspace
|
Grid |
getXGrid()
returns the x grid for the Gridpsace3D
|
double |
getXScale()
returns the scale of the x Axis
|
java.awt.geom.Rectangle2D.Double |
getXYBorders()
returns the Rectangle bordering the Gridspace
|
double |
getXYRatio()
returns the ratio of x vs y dimensions
|
double |
getXZRatio()
returns the ratio of x vs z dimensions
|
boolean |
getYAxisDirection()
returns the directions of the y axis in the gridspace
|
Grid |
getYGrid()
returns the y grid for the Gridpsace3D
|
double |
getYScale()
returns the scale of the y Axis
|
boolean |
getZAxisDirection()
returns the directions of the z axis in the gridspace
|
Grid |
getZGrid()
returns the z grid for the Gridpsace3D
|
double |
getZScale()
returns the scale of the z Axis
|
GridSpace3D |
growToInclude(GridSpace3D otherSpace)
returns the constraint that includes the new one as well.
|
void |
setAxisDirections(boolean xDir,
boolean yDir)
sets the directions of the axes in the gridspace
|
void |
setAxisDirections(boolean xDir,
boolean yDir,
boolean zDir)
sets the directions of the axes in the gridspace
|
void |
setDimensions(double lowX,
double highX,
double lowY,
double highY,
double lowZ,
double highZ)
sets the dimensions for the GridSpace3D class with coordinates provided
|
void |
setDimensions(NumberVariable xVar,
NumberVariable yVar)
set the dimensions of the GridSpace3D class with x and y coordinates
|
void |
setDimensions(NumberVariable xVar,
NumberVariable yVar,
float roundFac)
set the dimensions of the GridSpace3D class with x and y coordinates and a scaling factor
|
void |
setDimensions(NumberVariable xVar,
NumberVariable yVar,
NumberVariable zVar)
set the dimensions of the GridSpace3D class with x, y, and z coordinates
|
void |
setDimensions(NumberVariable xVar,
NumberVariable yVar,
NumberVariable zVar,
float roundFac)
set the dimensions of the GridSpace3D class with x and y coordinates and a scaling factor
|
void |
setDimensions(java.awt.Rectangle rec)
set the dimensions of the GridSpace3D class with a rectangle
|
void |
setDimensions(SpatialVector minXYZ,
SpatialVector maxXYZ)
set the dimensions of the GridSpace3D class with x and y coordinates
|
void |
setGrids(Grid theXGrid,
Grid theYGrid)
sets the dimensions for the GridSpace3D class with coordinates provided
|
void |
setGrids(Grid theXGrid,
Grid theYGrid,
Grid theZGrid)
sets the dimensions for the GridSpace3D class with coordinates provided
|
void |
setNUnits(int xUnits,
int yUnits)
sets the number of x, y units for the Gridspace
|
void |
setNUnits(int xUnits,
int yUnits,
int zUnits)
sets the number of x, y, z units for the Gridspace
|
void |
setSameXYScale(boolean sameScale)
x and y Axis measures are at the same scale
|
void |
setSameXYZScale(boolean sameScale)
x, y and z Axis measures are at the same scale
|
void |
setXGrid(Grid theXGrid)
sets the x grid for the Gridpsace3D
|
void |
setXScale(double newXScale)
sets the scale of the x Axis
|
void |
setYGrid(Grid theYGrid)
sets the y grid for the Gridpsace3D
|
void |
setYScale(double newYScale)
sets the scale of the y Axis
|
void |
setZGrid(Grid theZGrid)
sets the z grid for the Gridpsace3D
|
void |
setZScale(double newZScale)
sets the scale of the z Axis
|
java.lang.String |
toString()
returns the GridSpace3D as a String
|
java.awt.Rectangle |
toXYRect()
returns the x,y GridSpace3D as a Rectangle
|
java.awt.Rectangle |
toXZRect()
returns the x,z GridSpace3D as a Rectangle
|
java.awt.Rectangle |
toYZRect()
returns the y,z GridSpace3D as a Rectangle
|
void |
updatePixelExtent()
updates the size of the visual space when mapped to the screen pixels
|
void |
updateRatios()
update the ratios with grid info
|
void |
updateScales(int availX,
int availY)
update scale factors for x and y Axes
|
void |
updateScales(int availX,
int availY,
int availZ)
update scale factors for x, y and z Axes
|
public GridSpace3D() throws java.lang.Exception
java.lang.Exception
public GridSpace3D(double lowX, double highX, double lowY, double highY) throws java.lang.Exception
lowX
- left coordinate in double precisionhighX
- right coordinate in double precisionlowY
- bottom coordinate in double precisionhighY
- top coordinate in double precisionjava.lang.Exception
public GridSpace3D(double lowX, double highX, double lowY, double highY, double lowZ, double highZ) throws java.lang.Exception
lowX
- left coordinate in double precisionhighX
- right coordinate in double precisionlowY
- bottom coordinate in double precisionhighY
- top coordinate in double precisionlowZ
- front coordinate in double precisionhighZ
- back coordinate in double precisionjava.lang.Exception
public void setDimensions(java.awt.Rectangle rec) throws java.lang.Exception
rec
- the x,y dimensionsjava.lang.Exception
public void setDimensions(SpatialVector minXYZ, SpatialVector maxXYZ) throws java.lang.Exception
minXYZ
- minimum coordinatemaxXYZ
- maximum coordinatejava.lang.Exception
public void setDimensions(double lowX, double highX, double lowY, double highY, double lowZ, double highZ) throws java.lang.Exception
lowX
- left coordinate in double precisionhighX
- right coordinate in double precisionlowY
- bottom coordinate in double precisionhighY
- top coordinate in double precisionlowZ
- front coordinate in double precisionhighZ
- back coordinate in double precisionjava.lang.Exception
public void setDimensions(NumberVariable xVar, NumberVariable yVar) throws java.lang.Exception
xVar
- the numeric variable for xyVar
- the numeric variable for yjava.lang.Exception
public void setDimensions(NumberVariable xVar, NumberVariable yVar, NumberVariable zVar) throws java.lang.Exception
xVar
- the numeric variable for xyVar
- the numeric variable for yzVar
- the numeric variable for zjava.lang.Exception
public void setDimensions(NumberVariable xVar, NumberVariable yVar, float roundFac) throws java.lang.Exception
xVar
- the numeric variable for xyVar
- the numeric variable for yroundFac
- scalefactor the graph dimensions around the minimum dataspacejava.lang.Exception
public void setDimensions(NumberVariable xVar, NumberVariable yVar, NumberVariable zVar, float roundFac) throws java.lang.Exception
xVar
- the numeric variable for xyVar
- the numeric variable for yzVar
- the numeric variable for zroundFac
- scale factor for the size of bin dimensions beyond the absolute dataspacejava.lang.Exception
public void setGrids(Grid theXGrid, Grid theYGrid) throws java.lang.Exception
theXGrid
- the x dimension gridtheYGrid
- the y dimension gridjava.lang.Exception
public void setGrids(Grid theXGrid, Grid theYGrid, Grid theZGrid) throws java.lang.Exception
theXGrid
- the x dimension gridtheYGrid
- the y dimension gridtheZGrid
- the z dimension gridjava.lang.Exception
public void updateRatios()
public void setXGrid(Grid theXGrid)
theXGrid
- the grid for the x Axispublic void setYGrid(Grid theYGrid)
theYGrid
- the grid for the y Axispublic void setZGrid(Grid theZGrid)
theZGrid
- the grid for the z Axispublic Grid getXGrid()
public Grid getYGrid()
public Grid getZGrid()
public double getLowX()
public double getHighX()
public double getLowY()
public double getHighY()
public double getLowZ()
public double getHighZ()
public void setNUnits(int xUnits, int yUnits, int zUnits) throws java.lang.Exception
xUnits
- the number of grid units in the x dimensionyUnits
- the number of grid units in the y dimensionzUnits
- the number of grid units in the z dimensionjava.lang.Exception
public void setNUnits(int xUnits, int yUnits) throws java.lang.Exception
xUnits
- the number of grid units in the x dimensionyUnits
- the number of grid units in the y dimensionjava.lang.Exception
public void setAxisDirections(boolean xDir, boolean yDir)
xDir
- is the direction of the grid to positiveyDir
- is the direction of the grid to positivepublic void setAxisDirections(boolean xDir, boolean yDir, boolean zDir)
xDir
- is the direction of the grid to positiveyDir
- is the direction of the grid to positivezDir
- is the direction of the grid to positivepublic boolean getXAxisDirection()
public boolean getYAxisDirection()
public boolean getZAxisDirection()
public void updatePixelExtent()
public void setSameXYScale(boolean sameScale)
sameScale
- marks whether they are the samepublic void setSameXYZScale(boolean sameScale)
sameScale
- marks whether they are the samepublic boolean getSameXYScale()
public boolean getSameXYZScale()
public void updateScales(int availX, int availY)
availX
- the available widthavailY
- the available heightpublic void updateScales(int availX, int availY, int availZ)
availX
- the available widthavailY
- the available heightavailZ
- the available depthpublic void setXScale(double newXScale)
newXScale
- the new value to set for the scale of the x axispublic void setYScale(double newYScale)
newYScale
- the new value to set for the scale of the y axispublic void setZScale(double newZScale)
newZScale
- the new value to set for the scale of the z axispublic double getXScale()
public double getYScale()
public double getZScale()
public java.awt.geom.Rectangle2D.Double getXYBorders()
public int getPixelSpaceX()
public int getPixelSpaceY()
public int getPixelSpaceZ()
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Rectangle toXYRect()
public java.awt.Rectangle toXZRect()
public java.awt.Rectangle toYZRect()
public java.awt.Point getBinLoc(SpatialVector aVec)
aVec
- the SpatialVectorpublic boolean contains(SpatialVector aVec)
aVec
- the SpatialVectorpublic boolean contains(GridSpace3D aSpace)
aSpace
- the GridSpace3Dpublic boolean contains(java.awt.geom.Point2D.Double aPoint)
aPoint
- the Pointpublic GridSpace3D growToInclude(GridSpace3D otherSpace) throws java.lang.Exception
otherSpace
- the new GridSpace3Djava.lang.Exception
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public double getXYRatio()
public double getXZRatio()
RH, 2017