Class com.oroinc.math.geometry.Point
All Packages Class Hierarchy This Package Previous Next Index
Class com.oroinc.math.geometry.Point
java.lang.Object
|
+----com.oroinc.math.geometry.Tuple
|
+----com.oroinc.math.geometry.Point
- public final class Point
- extends Tuple
A class derived from Tuple representing a point in homogeneous
coordinates. Only Points with dimensions between 1 and 3 are
supported. The class isn't named GeometricPoint or something other
than Point because we feel this class will typically not be used
at the same time as the java.awt package and java.awt.Point are used.
Copyright © 1996, 1997 Original Reusable Objects, Inc.
All rights reserved.
- Author:
- Daniel F. Savarese
-
Point()
- Default constructor.
-
Point(float, float)
- Creates a two dimensional Point.
-
Point(float, float, float)
- Creates a three dimensional Point.
-
Point(int)
- Creates a Point of a given dimension and initizlies all of its
coordinates to 0.
-
Point(Tuple)
- The Point copy constructor.
-
assign(Point)
- This is the assignment operator for Points.
-
clone()
- Returns a deep copy of the Point.
-
setDimension(int)
- Sets the dimension of the Point.
Point
public Point(Tuple tuple)
- The Point copy constructor. Creates a new Point instance that is a
deep copy of the argument. The programmer should exercise care in
choosing what Tuple subclasses to pass as an argument.
- Parameters:
- tuple - The Tuple used to initialize the new Point.
Point
public Point(int dimension)
- Creates a Point of a given dimension and initizlies all of its
coordinates to 0. Only dimensions 1 to 3 are supported and no
check is made to ensure a valid argument was passed. It is the
programmer's responsibility to use valid arguments.
- Parameters:
- dimension - The dimension of the new Point.
Point
public Point()
- Default constructor. Creates a Point of dimension 0 under the
assumption that a subsequent call to
setDimension(int) will be made.
Point
public Point(float x,
float y)
- Creates a two dimensional Point.
- Parameters:
- x - The x coordinate.
- y - The y coordinate.
Point
public Point(float x,
float y,
float z)
- Creates a three dimensional Point.
- Parameters:
- x - The x coordinate.
- y - The y coordinate.
- z - The z coordinate.
assign
public void assign(Point point)
- This is the assignment operator for Points. Assigns the value of the
argument to the calling Point.
- Parameters:
- point - The value to assign to the Point.
clone
public Object clone()
- Returns a deep copy of the Point. Essentially just returns
new Point(this);
- Returns:
- A deep copy of the Point.
- Overrides:
- clone in class Tuple
setDimension
public void setDimension(int dimension)
- Sets the dimension of the Point. Only dimensions 1 to 3 are supported
and no check is made to ensure a valid argument was passed. It is the
programmer's responsibility to use valid arguments.
- Parameters:
- dimension - The new dimension of the Point.
- Overrides:
- setDimension in class Tuple
All Packages Class Hierarchy This Package Previous Next Index