: Class Point3D

cas
Class Point3D

java.lang.Object
  |
  +--cas.Tuple
        |
        +--cas.Point
              |
              +--cas.Point3D
All Implemented Interfaces:
java.io.Serializable

public class Point3D
extends Point
implements java.io.Serializable

A class representing the entity "3 dimensional Point". Data format is double.

Author:
Ziv Yaniv
See Also:
Serialized Form

Fields inherited from class cas.Tuple
data
 
Constructor Summary
Point3D()
          Create a point with all entries initialized to zero.
Point3D(double val)
          Create a point with all entries initialized to the given value.
Point3D(double[] data)
          Create a point according to the given double array.
Point3D(double x, double y, double z)
          Create a point according to the given coordinates.
Point3D(Point3D p)
          Copy constructor, create a point according to the given point.
 
Method Summary
 void set(double x, double y, double z)
          Set the point's coordinates to the given coordinates.
 
Methods inherited from class cas.Point
distanceL1, distanceL2, distanceL2Squared, distanceLinf
 
Methods inherited from class cas.Tuple
add, add, clamp, clamp, div, div, equals, getDimension, interpolate, interpolate, max, min, mul, mul, negate, negate, scale, scale, set, set, set, sub, sub, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point3D

public Point3D()
Create a point with all entries initialized to zero.

Point3D

public Point3D(double val)
Create a point with all entries initialized to the given value.
Parameters:
val - The value all point entries.

Point3D

public Point3D(double[] data)
Create a point according to the given double array.
Parameters:
data - The point will contain entries as specified by the given array. The array size must be three.

Point3D

public Point3D(Point3D p)
Copy constructor, create a point according to the given point.
Parameters:
p - Create a copy of this point.

Point3D

public Point3D(double x,
               double y,
               double z)
Create a point according to the given coordinates.
Parameters:
x - Point's x coordinate.
y - Point's y coordinate.
z - Point's z coordinate.
Method Detail

set

public void set(double x,
                double y,
                double z)
Set the point's coordinates to the given coordinates.
Parameters:
x - Point's new x coordinate.
y - Point's new y coordinate.
z - Point's new z coordinate.