ImageScience 3.0.0

imagescience.shape
Class Point

java.lang.Object
  extended by imagescience.shape.Point

public class Point
extends java.lang.Object

A point in 5D space.


Field Summary
 double c
          The c-coordinate of the point.
 double t
          The t-coordinate of the point.
 double x
          The x-coordinate of the point.
 double y
          The y-coordinate of the point.
 double z
          The z-coordinate of the point.
 
Constructor Summary
Point()
          Default constructor.
Point(double x)
          One-dimensional constructor.
Point(double x, double y)
          Two-dimensional constructor.
Point(double x, double y, double z)
          Three-dimensional constructor.
Point(double x, double y, double z, double t)
          Four-dimensional constructor.
Point(double x, double y, double z, double t, double c)
          Five-dimensional constructor.
Point(Point point)
          Copy constructor.
 
Method Summary
 Point duplicate()
          Returns an exact copy of this object.
 boolean equals(Point point)
          Indicates whether this object represents the same point as the given object.
 void set(double x)
          Sets the one-dimensional position of the point.
 void set(double x, double y)
          Sets the two-dimensional position of the point.
 void set(double x, double y, double z)
          Sets the three-dimensional position of the point.
 void set(double x, double y, double z, double t)
          Sets the four-dimensional position of the point.
 void set(double x, double y, double z, double t, double c)
          Sets the five-dimensional position of the point.
 void set(Point point)
          Sets the coordinates of this point to the coordinates of the given point.
 void translate(double dx)
          Translates the point in one dimension.
 void translate(double dx, double dy)
          Translates the point in two dimensions.
 void translate(double dx, double dy, double dz)
          Translates the point in three dimensions.
 void translate(double dx, double dy, double dz, double dt)
          Translates the point in four dimensions.
 void translate(double dx, double dy, double dz, double dt, double dc)
          Translates the point in five dimensions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public double x
The x-coordinate of the point. The default value is 0.


y

public double y
The y-coordinate of the point. The default value is 0.


z

public double z
The z-coordinate of the point. The default value is 0.


t

public double t
The t-coordinate of the point. The default value is 0.


c

public double c
The c-coordinate of the point. The default value is 0.

Constructor Detail

Point

public Point()
Default constructor. All coordinates are set to their default values.


Point

public Point(double x)
One-dimensional constructor. The x-coordinate is set to the given value while the remaining coordinates are set to their default values.

Parameters:
x - The x-coordinate.

Point

public Point(double x,
             double y)
Two-dimensional constructor. The x- and y-coordinates are set to the given values while the remaining coordinates are set to their default values.

Parameters:
x - The x-coordinate.
y - The y-coordinate.

Point

public Point(double x,
             double y,
             double z)
Three-dimensional constructor. The x-, y-, and z-coordinates are set to the given values while the remaining coordinates are set to their default values.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.

Point

public Point(double x,
             double y,
             double z,
             double t)
Four-dimensional constructor. The x-, y-, z-, and t-coordinates are set to the given values while the remaining coordinate is set to its default value.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.
t - The t-coordinate.

Point

public Point(double x,
             double y,
             double z,
             double t,
             double c)
Five-dimensional constructor. The x-, y-, z-, t-, and c-coordinates are set to the given values.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.
t - The t-coordinate.
c - The c-coordinate.

Point

public Point(Point point)
Copy constructor.

Parameters:
point - The point to be copied. All information is copied and no memory is shared with this point.
Throws:
java.lang.NullPointerException - If point is null.
Method Detail

set

public void set(double x)
Sets the one-dimensional position of the point. The x-coordinate is set to the given value and the remaining coordinates are not changed.

Parameters:
x - The x-coordinate.

set

public void set(double x,
                double y)
Sets the two-dimensional position of the point. The x- and y-coordinates are set to the given values and the remaining coordinates are not changed.

Parameters:
x - The x-coordinate.
y - The y-coordinate.

set

public void set(double x,
                double y,
                double z)
Sets the three-dimensional position of the point. The x-, y-, and z-coordinates are set to the given values and the remaining coordinates are not changed.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.

set

public void set(double x,
                double y,
                double z,
                double t)
Sets the four-dimensional position of the point. The x-, y-, z-, and t-coordinates are set to the given values and the remaining coordinate is not changed.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.
t - The t-coordinate.

set

public void set(double x,
                double y,
                double z,
                double t,
                double c)
Sets the five-dimensional position of the point. The x-, y-, z-, t-, and c-coordinates are set to the given values.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
z - The z-coordinate.
t - The t-coordinate.
c - The c-coordinate.

set

public void set(Point point)
Sets the coordinates of this point to the coordinates of the given point.

Parameters:
point - The point whose coordinates are to be copied.
Throws:
java.lang.NullPointerException - If point is null.

translate

public void translate(double dx)
Translates the point in one dimension. The x-coordinate is increased by the given amount while the remaining coordinates are not changed.

Parameters:
dx - The distance in the x-dimension over which to translate.

translate

public void translate(double dx,
                      double dy)
Translates the point in two dimensions. The x- and y-coordinates are increased by the given amounts while the remaining coordinates are not changed.

Parameters:
dx - The distance in the x-dimension over which to translate.
dy - The distance in the y-dimension over which to translate.

translate

public void translate(double dx,
                      double dy,
                      double dz)
Translates the point in three dimensions. The x-, y-, and z-coordinates are increased by the given amounts while the remaining coordinates are not changed.

Parameters:
dx - The distance in the x-dimension over which to translate.
dy - The distance in the y-dimension over which to translate.
dz - The distance in the z-dimension over which to translate.

translate

public void translate(double dx,
                      double dy,
                      double dz,
                      double dt)
Translates the point in four dimensions. The x-, y-, z-, and t-coordinates are increased by the given amounts while the remaining coordinate is not changed.

Parameters:
dx - The distance in the x-dimension over which to translate.
dy - The distance in the y-dimension over which to translate.
dz - The distance in the z-dimension over which to translate.
dt - The distance in the t-dimension over which to translate.

translate

public void translate(double dx,
                      double dy,
                      double dz,
                      double dt,
                      double dc)
Translates the point in five dimensions. The x-, y-, z-, t-, and c-coordinates are increased by the given amounts.

Parameters:
dx - The distance in the x-dimension over which to translate.
dy - The distance in the y-dimension over which to translate.
dz - The distance in the z-dimension over which to translate.
dt - The distance in the t-dimension over which to translate.
dc - The distance in the c-dimension over which to translate.

duplicate

public Point duplicate()
Returns an exact copy of this object.

Returns:
An exact copy of this object. All information is copied and no memory is shared between this and the returned object.

equals

public boolean equals(Point point)
Indicates whether this object represents the same point as the given object.

Parameters:
point - The point to compare this point with.
Returns:
Value true if point is not null, and each of its coordinates is equal to the corresponding coordinate of this object, or false if this is not the case.

ImageScience 3.0.0

Copyright (C) Erik Meijering. Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.

IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER. THE COPYRIGHT HOLDER IS FREE TO MAKE VERSIONS OF THE SOFTWARE AVAILABLE FOR A FEE OR COMMERCIALLY ONLY.

IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND CORRESPONDING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.