Top Description Fields Constructors Methods
javax.vecmath

public Class Point3d

extends Tuple3d
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.lang.Math

A 3 element point that is represented by double precision floating point x,y,z coordinates.

Field Summary

Modifier and TypeField and Description
pack-priv static final long
Inherited from javax.vecmath.Tuple3d:
xyz

Constructor Summary

AccessConstructor and Description
public
Point3d(double
the x coordinate
x
,
double
the y coordinate
y
,
double
the z coordinate
z
)

Constructs and initializes a Point3d from the specified xyz coordinates.

public
Point3d(double[]
the array of length 3 containing xyz in order
p
)

Constructs and initializes a Point3d from the array of length 3.

public
Point3d(Point3d
the Point3d containing the initialization x y z data
p1
)

Constructs and initializes a Point3d from the specified Point3d.

public
Point3d(Point3f
the Point3f containing the initialization x y z data
p1
)

Constructs and initializes a Point3d from the specified Point3f.

public
Point3d(Tuple3f
the Tuple3f containing the initialization x y z data
t1
)

Constructs and initializes a Point3d from the specified Tuple3f.

public
Point3d(Tuple3d
the Tuple3d containing the initialization x y z data
t1
)

Constructs and initializes a Point3d from the specified Tuple3d.

public
Point3d()

Constructs and initializes a Point3d to (0,0,0).

Method Summary

Modifier and TypeMethod and Description
public final double

Returns:

the distance
distance
(Point3d
the other point
p1
)

Returns the distance between this point and point p1.

public final double

Returns:

the L-1 distance
distanceL1
(Point3d
the other point
p1
)

Computes the L-1 (Manhattan) distance between this point and point p1.

public final double

Returns:

the L-infinite distance
distanceLinf
(Point3d
the other point
p1
)

Computes the L-infinite distance between this point and point p1.

public final double

Returns:

the square of the distance
distanceSquared
(Point3d
the other point
p1
)

Returns the square of the distance between this point and point p1.

public final void
project(Point4d
the source Point4d, which is not modified
p1
)

Multiplies each of the x,y,z components of the Point4d parameter by 1/w and places the projected values into this point.

Inherited from javax.vecmath.Tuple3d:
absoluteabsoluteaddaddclampclampclampclampclampMaxclampMaxclampMaxclampMaxclampMinclampMinclampMinclampMincloneepsilonEqualsequalsequalsgetgetgetXgetYgetZhashCodeinterpolateinterpolateinterpolateinterpolatenegatenegatescalescalescaleAddscaleAddscaleAddsetsetsetsetsetXsetYsetZsubsubtoString

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.vecmath.Tuple3d.serialVersionUID.

Constructor Detail

Point3dback to summary
public Point3d(double x, double y, double z)

Constructs and initializes a Point3d from the specified xyz coordinates.

Parameters
x:double

the x coordinate

y:double

the y coordinate

z:double

the z coordinate

Point3dback to summary
public Point3d(double[] p)

Constructs and initializes a Point3d from the array of length 3.

Parameters
p:double[]

the array of length 3 containing xyz in order

Point3dback to summary
public Point3d(Point3d p1)

Constructs and initializes a Point3d from the specified Point3d.

Parameters
p1:Point3d

the Point3d containing the initialization x y z data

Point3dback to summary
public Point3d(Point3f p1)

Constructs and initializes a Point3d from the specified Point3f.

Parameters
p1:Point3f

the Point3f containing the initialization x y z data

Point3dback to summary
public Point3d(Tuple3f t1)

Constructs and initializes a Point3d from the specified Tuple3f.

Parameters
t1:Tuple3f

the Tuple3f containing the initialization x y z data

Point3dback to summary
public Point3d(Tuple3d t1)

Constructs and initializes a Point3d from the specified Tuple3d.

Parameters
t1:Tuple3d

the Tuple3d containing the initialization x y z data

Point3dback to summary
public Point3d()

Constructs and initializes a Point3d to (0,0,0).

Method Detail

distanceback to summary
public final double distance(Point3d p1)

Returns the distance between this point and point p1.

Parameters
p1:Point3d

the other point

Returns:double

the distance

distanceL1back to summary
public final double distanceL1(Point3d p1)

Computes the L-1 (Manhattan) distance between this point and point p1. The L-1 distance is equal to: abs(x1-x2) + abs(y1-y2) + abs(z1-z2).

Parameters
p1:Point3d

the other point

Returns:double

the L-1 distance

distanceLinfback to summary
public final double distanceLinf(Point3d p1)

Computes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)].

Parameters
p1:Point3d

the other point

Returns:double

the L-infinite distance

distanceSquaredback to summary
public final double distanceSquared(Point3d p1)

Returns the square of the distance between this point and point p1.

Parameters
p1:Point3d

the other point

Returns:double

the square of the distance

projectback to summary
public final void project(Point4d p1)

Multiplies each of the x,y,z components of the Point4d parameter by 1/w and places the projected values into this point.

Parameters
p1:Point4d

the source Point4d, which is not modified