Modifier and Type | Field and Description |
---|---|
protected float[] |
axes |
Constructor and Description |
---|
Point(Datum datum)
Create point with the axis values given in a Datum
|
Point(double x)
Create a one dimensional point with the given axis value.
|
Point(double x,
double y)
Create a two dimensional point with the given axis values.
|
Point(double x,
double y,
double z)
Create a three dimensional point with the given axis values.
|
Point(float[] coords)
Create point with the coord values given in an array of floats.
|
Point(float[] coords,
int startIndex,
int numCoords)
Create a point with the coord values interleaved in an array of floats.
|
Point(int n)
Create a point with n dimensions.
|
Point(Point p)
Create a copy of the Point parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Point dsd)
For each axis of this Point, add the value
of the corresponding axis of the parameter.
|
void |
assign(float[] coords,
int pointIndex,
int numCoords)
Deprecated.
Use setCoords( float[], int startIndex, int numCoords ).
Note that the semantics of the start position is different in setCoords.
|
void |
assign(Point id)
Set the axes of this id to the axes of the parameter id.
|
java.lang.Object |
clone()
Return a copy of this point.
|
boolean |
containedBy(GBounds db)
Returns true if this Point is contained by the
ISBounds parameter, or false otherwise.
|
int |
dim()
Returns the dimensionality of this Point.
|
float |
distance(Point p)
Compute the euclidean distance between this point and the argument.
|
boolean |
equal(Point id)
Return true if parameter is equal to this object, false otherwise.
|
float |
getCoord(int axisNumber)
Get the value corresponding to the specified axis.
|
float[] |
getCoords(float[] axes)
Copy the coordinates into the argument array.
|
float |
getFloatAxis(int axisNumber)
Get the value corresponding to the specified axis.
|
int |
getIntAxis(int axisNumber)
Get the value corresponding to the specified axis.
|
boolean |
greaterThanOrEqual(Point dsd)
A helper function that returns true if all the coordinates of this
id are greater than or equal to the corresponding coordinates of the parameter id.
|
boolean |
lessThanOrEqual(Point dsd)
A helper function that returns true if all the coordinates of this
id are less than or equal to the corresponding coordinates of the parameter id.
|
Datum |
makeDatum()
Returns a new datum that contains the point axes as values.
|
void |
negate()
Arithmetically negate this Point's axis values.
|
void |
print()
Print the point coordinates
|
void |
setCoord(int axisnumber,
float value)
Set the specified axis to the specified value.
|
void |
setCoord(int axisnumber,
int value)
Set the specified axis to the specified value.
|
void |
setCoords(float[] coords,
int startIndex,
int numCoords)
Assign new coordinate values to an existing Point of the same dimensionality.
|
void |
subtract(Point dsd)
For each axis of this Point, subtract the value
of the corresponding axis of the parameter.
|
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.
|
public Point(int n)
public Point(double x)
public Point(double x, double y)
public Point(double x, double y, double z)
public Point(Datum datum)
public Point(float[] coords)
public Point(float[] coords, int startIndex, int numCoords)
public Point(Point p)
public Datum makeDatum()
public final int getIntAxis(int axisNumber)
public final float getFloatAxis(int axisNumber)
public float getCoord(int axisNumber)
public float[] getCoords(float[] axes)
public void setCoord(int axisnumber, float value)
public final void setCoord(int axisnumber, int value)
public java.lang.Object clone()
public final int dim()
public void assign(Point id)
public void assign(float[] coords, int pointIndex, int numCoords)
public void setCoords(float[] coords, int startIndex, int numCoords)
public void add(Point dsd)
public void negate()
public void subtract(Point dsd)
public boolean containedBy(GBounds db)
public boolean equal(Point id)
public boolean lessThanOrEqual(Point dsd)
public boolean greaterThanOrEqual(Point dsd)
public float distance(Point p)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String indent)
public void print()