maspack.matrix
Class Point3d

java.lang.Object
  extended by maspack.matrix.VectorBase
      extended by maspack.matrix.Vector3d
          extended by maspack.matrix.Point3d
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Vector, Clonable
Direct Known Subclasses:
CubaturePoint3d, MaterialPoint, MeshIntersectionPoint

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
static Point3d NEGATIVE_INFINITY
           
static Point3d POSITIVE_INFINITY
           
static Point3d ZERO
          Global zero point.
 
Fields inherited from class maspack.matrix.Vector3d
NEG_X_UNIT, NEG_Y_UNIT, NEG_Z_UNIT, x, X_UNIT, y, Y_UNIT, z, Z_UNIT
 
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(Point3d v)
          Creates a Point3d by copying a Point3d
Point3d(Vector3d v)
          Creates a Point3d by copying a vector
 
Method Summary
 void inverseTransform(AffineTransform3dBase X)
          Applies an inverse affine transformation to this point, in place.
 void inverseTransform(AffineTransform3dBase X, Vector3d p1)
          Applies an inverse affine transformation to the point p1, and places the result in this vector.
 void transform(AffineTransform3dBase X)
          Applies an affine transformation to this point, in place.
 void transform(AffineTransform3dBase 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, add, angle, angleWeightedCross, angleWeightedCrossAdd, clone, combine, cross, cross, crossAdd, distance, distanceSquared, dot, epsilonEquals, equals, get, get, get, get, get, greater, greaterEquals, hermiteInterpolate, hermiteVelocity, infinityNorm, interpolate, interpolate, inverseTransform, inverseTransform, main, max, maxAbsIndex, maxElement, min, minAbsIndex, minElement, mul, mulAdd, mulTranspose, mulTransposeAdd, negate, negate, norm, normalize, normalize, normSquared, oneNorm, perpendicular, scale, scale, scale, scaledAdd, scaledAdd, scan, set, set, set, set, set, set, setFromHomogeneous, setRandom, setRandom, setRandom, setZero, size, sort, sort, sortAbsolute, sub, sub, transform, transform, triangleArea, updateBounds, write
 
Methods inherited from class maspack.matrix.VectorBase
containsNaN, copy, copyAndAdd, copyAndNegate, copyAndScale, copyAndSub, copyAndSubLeft, dot, epsilonEquals, equals, get, getDefaultFormat, hasNaN, isColumnVectorStringsVertical, isFixedSize, isRowVector, set, set, setColumnVectorStringsVertical, setDefaultFormat, setRowVector, setSize, toString, toString, toString, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Point3d ZERO
Global zero point. Should not be modified.


POSITIVE_INFINITY

public static final Point3d POSITIVE_INFINITY

NEGATIVE_INFINITY

public static final Point3d NEGATIVE_INFINITY
Constructor Detail

Point3d

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


Point3d

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

Parameters:
v - point to be copied

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(AffineTransform3dBase X)
Applies an affine transformation to this point, in place.

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

transform

public void transform(AffineTransform3dBase 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(AffineTransform3dBase X)
Applies an inverse affine transformation to this point, in place.

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

inverseTransform

public void inverseTransform(AffineTransform3dBase 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