Top Description Fields Constructors Methods
javax.vecmath

public Class Point3f

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

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
Point3f(float
the x coordinate
x
,
float
the y coordinate
y
,
float
the z coordinate
z
)

Constructs and initializes a Point3f from the specified xyz coordinates.

public
Point3f(float[]
the array of length 3 containing xyz in order
p
)

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

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

Constructs and initializes a Point3f from the specified Point3f.

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

Constructs and initializes a Point3f from the specified Point3d.

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

Constructs and initializes a Point3f from the specified Tuple3f.

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

Constructs and initializes a Point3f from the specified Tuple3d.

public
Point3f()

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

Method Summary

Modifier and TypeMethod and Description
public final float

Returns:

the distance
distance
(Point3f
the other point
p1
)

Computes the distance between this point and point p1.

public final float

Returns:

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

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

public final float

Returns:

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

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

public final float

Returns:

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

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

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

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

Inherited from javax.vecmath.Tuple3f:
absoluteabsoluteaddaddclampclampclampMaxclampMaxclampMinclampMincloneepsilonEqualsequalsequalsgetgetgetXgetYgetZhashCodeinterpolateinterpolatenegatenegatescalescalescaleAddscaleAddsetsetsetsetsetXsetYsetZsubsubtoString

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.vecmath.Tuple3f.serialVersionUID.

Constructor Detail

Point3fback to summary
public Point3f(float x, float y, float z)

Constructs and initializes a Point3f from the specified xyz coordinates.

Parameters
x:float

the x coordinate

y:float

the y coordinate

z:float

the z coordinate

Point3fback to summary
public Point3f(float[] p)

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

Parameters
p:float[]

the array of length 3 containing xyz in order

Point3fback to summary
public Point3f(Point3f p1)

Constructs and initializes a Point3f from the specified Point3f.

Parameters
p1:Point3f

the Point3f containing the initialization x y z data

Point3fback to summary
public Point3f(Point3d p1)

Constructs and initializes a Point3f from the specified Point3d.

Parameters
p1:Point3d

the Point3d containing the initialization x y z data

Point3fback to summary
public Point3f(Tuple3f t1)

Constructs and initializes a Point3f from the specified Tuple3f.

Parameters
t1:Tuple3f

the Tuple3f containing the initialization x y z data

Point3fback to summary
public Point3f(Tuple3d t1)

Constructs and initializes a Point3f from the specified Tuple3d.

Parameters
t1:Tuple3d

the Tuple3d containing the initialization x y z data

Point3fback to summary
public Point3f()

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

Method Detail

distanceback to summary
public final float distance(Point3f p1)

Computes the distance between this point and point p1.

Parameters
p1:Point3f

the other point

Returns:float

the distance

distanceL1back to summary
public final float distanceL1(Point3f 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:Point3f

the other point

Returns:float

the L-1 distance

distanceLinfback to summary
public final float distanceLinf(Point3f 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:Point3f

the other point

Returns:float

the L-infinite distance

distanceSquaredback to summary
public final float distanceSquared(Point3f p1)

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

Parameters
p1:Point3f

the other point

Returns:float

the square of the distance

projectback to summary
public final void project(Point4f p1)

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

Parameters
p1:Point4f

the source Point4f, which is not modified