maspack.matrix

## Class Point3d

• All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Vector, VectorObject<Vector3d>, Clonable, Scannable
Direct Known Subclasses:

```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
Serialized Form
• ### Field Summary

Fields
Modifier and Type Field and Description
`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, ONES, x, X_UNIT, y, Y_UNIT, z, Z_UNIT`
• ### Constructor Summary

Constructors
Constructor and Description
`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(Vector v)`
Creates a Point3d by copying an existing Vector.
`Point3d(Vector3d v)`
Creates a Point3d by copying a vector
• ### Method Summary

All Methods
Modifier and Type Method and Description
`Point3d` `clone()`
`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, addObj, angle, angleWeightedCross, angleWeightedCrossAdd, 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, scaledAddObj, scaleObj, scan, set, set, 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, hasInf, hasNaN, isColumnVectorStringsVertical, isFixedSize, isRowVector, isWritable, scan, set, set, setColumnVectorStringsVertical, setDefaultFormat, setRowVector, setSize, toString, toString, toString, write, write, writeToFile`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Methods inherited from interface maspack.matrix.VectorObject

`getThreeVectorValue`
• ### Methods inherited from interface maspack.util.Scannable

`isWritable, scan, write`
• ### 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(Vector v)`
Creates a Point3d by copying an existing Vector. The size of the copied vector must be at least 3.
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
• #### clone

`public Point3d clone()`
Specified by:
`clone` in interface `Clonable`
Overrides:
`clone` in class `Vector3d`