All Packages Class Hierarchy This Package Previous Next Index
Class openstar.util.Point
java.lang.Object
|
+----openstar.util.Point
- public class Point
- extends Object
- implements Transformable
A class representing points in the n-dimensional euclidean space.
- Version:
- 09 Apr 1997
- Author:
- Nils Schwabe
-
equalityTreshold
- Interval in which two coordinate values are treated as beeing equal.
-
Point(double, double)
- Constructs a 2-D point with specified coordinates.
-
Point(double, double, double)
- Constructs a 3-D point with specified coordinates.
-
Point(int)
- Constructs a new n-dimensional point.
-
assign(Point)
- Assigns the coordinate values of another point to this point.
-
clone()
- Makes a deep copy of this point.
-
equals(Object)
-
-
get(int)
- Gets the coordinate value for a given dimension.
-
getDim()
- Returns the number of dimensions of this point.
-
set(int, double)
- Sets the coordinate value for a given dimension.
-
toString()
-
-
transform(Transformation)
- Transforms this point.
equalityTreshold
public double equalityTreshold
- Interval in which two coordinate values are treated as beeing equal.
Point
public Point(int dimensions)
- Constructs a new n-dimensional point.
- Parameters:
- dimensions - number of dimensions
Point
public Point(double x,
double y)
- Constructs a 2-D point with specified coordinates.
- Parameters:
- x - first coordinate
- y - second coordinate
Point
public Point(double x,
double y,
double z)
- Constructs a 3-D point with specified coordinates.
- Parameters:
- x - first coordinate
- y - second coordinate
clone
public Object clone()
- Makes a deep copy of this point.
- Overrides:
- clone in class Object
assign
public void assign(Point p)
- Assigns the coordinate values of another point to this point.
Dimension conflicts are ignored, i.e. if the other point has
too many coordinates then they are ignored, or the remaining
coordinates of this point are set to 0.
toString
public String toString()
- Overrides:
- toString in class Object
equals
public boolean equals(Object obj)
- Overrides:
- equals in class Object
get
public double get(int index)
- Gets the coordinate value for a given dimension.
- Parameters:
- index - zero-based index (0.0 is returned if the index is too big)
set
public void set(int index,
double newVal)
- Sets the coordinate value for a given dimension.
- Parameters:
- index - zero-based index (ignored if the index is too big)
- newVal - new value
getDim
public int getDim()
- Returns the number of dimensions of this point.
transform
public void transform(Transformation t)
- Transforms this point.
All Packages Class Hierarchy This Package Previous Next Index