maspack.matrix
Class Point3d

java.lang.Object
  extended bymaspack.matrix.VectorObject
      extended bymaspack.matrix.Vector3d
          extended bymaspack.matrix.Point3d
All Implemented Interfaces:
java.io.Serializable

public class Point3d
extends Vector3d

A 3D spatial point. The only difference between a point and a vector is in the the way it is transformed by an affine transformation. In homogeneous coordinates, a point is assigned a 1 in for its fourth entry, so the affine transformation of a point takes the form
A p + b

See Also:
Serialized Form

Field Summary
 
Fields inherited from class maspack.matrix.Vector3d
x, y, z
 
Constructor Summary
Point3d()
          Creates a Point3d and initializes it to zero.
Point3d(double[] values)
          Creates a Point3d with the supplied element values.
Point3d(double x, double y, double z)
          Creates a Point3d with the supplied element values.
Point3d(Vector3d v)
          Creates a Point3d by copying a vector
 
Method Summary
 void inverseTransform(AffineTransform3dObject X)
          Applies an inverse affine transformation to this point, in place.
 void inverseTransform(AffineTransform3dObject X, Vector3d p1)
          Applies an inverse affine transformation to the point p1, and places the result in this vector.
 void transform(AffineTransform3dObject X)
          Applies an affine transformation to this point, in place.
 void transform(AffineTransform3dObject X, Vector3d p1)
          Applies an affine transformation to the point p1, and places the result in this point.
 
Methods inherited from class maspack.matrix.Vector3d
absolute, absolute, add, add, angle, combine, cross, cross, crossAdd, distance, distanceSquared, dot, epsilonEquals, equals, get, get, infinityNorm, interpolate, interpolate, inverseTransform, inverseTransform, maxAbsIndex, maxElement, minAbsIndex, minElement, mul, mulTranspose, negate, negate, norm, normalize, normalize, normSquared, oneNorm, perpendicular, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setFromHomogeneous, setRandom, setRandom, setRandom, setZero, size, sort, sort, sortAbsolute, sub, sub, transform, transform
 
Methods inherited from class maspack.matrix.VectorObject
dot, epsilonEquals, equals, equals, get, isFixedSize, scan, set, setSize, toString, toString, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Point3d

public Point3d()
Creates a Point3d and initializes it to zero.


Point3d

public Point3d(Vector3d v)
Creates a Point3d by copying a vector

Parameters:
v - vector to be copied

Point3d

public Point3d(double[] values)
Creates a Point3d with the supplied element values.

Parameters:
values - element values

Point3d

public Point3d(double x,
               double y,
               double z)
Creates a Point3d with the supplied element values.

Parameters:
x - first element
y - second element
z - third element
Method Detail

transform

public void transform(AffineTransform3dObject X)
Applies an affine transformation to this point, in place.

Overrides:
transform in class Vector3d
Parameters:
X - affine transformation

transform

public void transform(AffineTransform3dObject X,
                      Vector3d p1)
Applies an affine transformation to the point p1, and places the result in this point.

Overrides:
transform in class Vector3d
Parameters:
X - affine transformation
p1 - point to be transformed

inverseTransform

public void inverseTransform(AffineTransform3dObject X)
Applies an inverse affine transformation to this point, in place.

Overrides:
inverseTransform in class Vector3d
Parameters:
X - affine transformation

inverseTransform

public void inverseTransform(AffineTransform3dObject X,
                             Vector3d p1)
Applies an inverse affine transformation to the point p1, and places the result in this vector.

Overrides:
inverseTransform in class Vector3d
Parameters:
X - affine transformation
p1 - point to be transformed