Top Description Fields Constructors Methods
javax.vecmath

public Class AxisAngle4d

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable

A four-element axis angle represented by double-precision floating point x,y,z,angle components. An axis angle is a rotation of angle (radians) about the vector (x,y,z).

Field Summary

Modifier and TypeField and Description
public double
angle

The angle of rotation in radians.

pack-priv static final double
pack-priv static final long
public double
x

The x coordinate.

public double
y

The y coordinate.

public double
z

The z coordinate.

Constructor Summary

AccessConstructor and Description
public
AxisAngle4d(double
the x coordinate
x
,
double
the y coordinate
y
,
double
the z coordinate
z
,
double
the angle of rotation in radians
angle
)

Constructs and initializes an AxisAngle4d from the specified x, y, z, and angle.

public
AxisAngle4d(double[]
the array of length 4 containing x,y,z,angle in order
a
)

Constructs and initializes an AxisAngle4d from the components contained in the array.

public
AxisAngle4d(AxisAngle4d
the AxisAngle4d containing the initialization x y z angle data
a1
)

Constructs and initializes an AxisAngle4d from the specified AxisAngle4d.

public
AxisAngle4d(AxisAngle4f
the AxisAngle4f containing the initialization x y z angle data
a1
)

Constructs and initializes an AxisAngle4d from the specified AxisAngle4f.

public
AxisAngle4d(Vector3d
the axis
axis
,
double
the angle of rotation in radian
angle
)

Constructs and initializes an AxisAngle4d from the specified axis and angle.

public
AxisAngle4d()

Constructs and initializes an AxisAngle4d to (0,0,1,0).

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of this instance.
clone
()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.
public boolean
epsilonEquals(AxisAngle4d
the axis-angle to be compared to this axis-angle
a1
,
double
the threshold value
epsilon
)

Returns true if the L-infinite distance between this axis-angle and axis-angle a1 is less than or equal to the epsilon parameter, otherwise returns false.

public boolean

Returns:

true or false
equals
(AxisAngle4d
the axis-angle with which the comparison is made
a1
)

Returns true if all of the data members of AxisAngle4d a1 are equal to the corresponding data members in this AxisAngle4d.

public boolean

Returns:

true or false
equals
(Object
the object with which the comparison is made
o1
)

Overrides java.lang.Object.equals.

Returns true if the Object o1 is of type AxisAngle4d and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4d.
public final void
get(double[]
the array of length four
a
)

Gets the value of this axis angle and places it into the array a of length four in x,y,z,angle order.

public final double

Returns:

the angle, in radians.
getAngle
()

Get the axis angle, in radians.

public double

Returns:

the x coordinate.
getX
()

Get value of x coordinate.

public final double

Returns:

the y coordinate.
getY
()

Get value of y coordinate.

public double

Returns:

the z coordinate.
getZ
()

Get value of z coordinate.

public int

Returns:

the integer hash code value
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object.
public final void
set(double
the x coordinate
x
,
double
the y coordinate
y
,
double
the z coordinate
z
,
double
the angle of rotation in radians
angle
)

Sets the value of this axis angle to the specified x,y,z,angle.

public final void
set(double[]
the array of length 4 containing x,y,z,angle in order
a
)

Sets the value of this axis angle to the specified x,y,z,angle.

public final void
set(AxisAngle4d
the axis angle to be copied
a1
)

Sets the value of this axis angle to the value of axis angle a1.

public final void
set(AxisAngle4f
the axis angle to be copied
a1
)

Sets the value of this axis angle to the value of axis angle a1.

public final void
set(Vector3d
the axis
axis
,
double
the angle of rotation in radians
angle
)

Sets the value of this AxisAngle4d to the specified axis and angle.

public final void
set(Matrix4f
the matrix4f
m1
)

Sets the value of this axis-angle to the rotational component of the passed matrix.

public final void
set(Matrix4d
the matrix4d
m1
)

Sets the value of this axis-angle to the rotational component of the passed matrix.

public final void
set(Matrix3f
the matrix3f
m1
)

Sets the value of this axis-angle to the rotational component of the passed matrix.

public final void
set(Matrix3d
the matrix3d
m1
)

Sets the value of this axis-angle to the rotational component of the passed matrix.

public final void
set(Quat4f
the Quat4f
q1
)

Sets the value of this axis-angle to the rotational equivalent of the passed quaternion.

public final void
set(Quat4d
the Quat4d
q1
)

Sets the value of this axis-angle to the rotational equivalent of the passed quaternion.

public final void
setAngle(double
The angle to set, in radians.
angle
)

Set the axis angle, in radians.

public final void
setX(double
the x coordinate.
x
)

Set a new value for x coordinate.

public final void
setY(double
the y coordinate.
y
)

Set a new value for y coordinate.

public final void
setZ(double
the z coordinate.
z
)

Set a new value for z coordinate.

public String

Returns:

the String representation
toString
()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this AxisAngle4d.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

angleback to summary
public double angle

The angle of rotation in radians.

EPSback to summary
pack-priv static final double EPS
serialVersionUIDback to summary
pack-priv static final long serialVersionUID
xback to summary
public double x

The x coordinate.

yback to summary
public double y

The y coordinate.

zback to summary
public double z

The z coordinate.

Constructor Detail

AxisAngle4dback to summary
public AxisAngle4d(double x, double y, double z, double angle)

Constructs and initializes an AxisAngle4d from the specified x, y, z, and angle.

Parameters
x:double

the x coordinate

y:double

the y coordinate

z:double

the z coordinate

angle:double

the angle of rotation in radians

AxisAngle4dback to summary
public AxisAngle4d(double[] a)

Constructs and initializes an AxisAngle4d from the components contained in the array.

Parameters
a:double[]

the array of length 4 containing x,y,z,angle in order

AxisAngle4dback to summary
public AxisAngle4d(AxisAngle4d a1)

Constructs and initializes an AxisAngle4d from the specified AxisAngle4d.

Parameters
a1:AxisAngle4d

the AxisAngle4d containing the initialization x y z angle data

AxisAngle4dback to summary
public AxisAngle4d(AxisAngle4f a1)

Constructs and initializes an AxisAngle4d from the specified AxisAngle4f.

Parameters
a1:AxisAngle4f

the AxisAngle4f containing the initialization x y z angle data

AxisAngle4dback to summary
public AxisAngle4d(Vector3d axis, double angle)

Constructs and initializes an AxisAngle4d from the specified axis and angle.

Parameters
axis:Vector3d

the axis

angle:double

the angle of rotation in radian

Since
vecmath 1.2
AxisAngle4dback to summary
public AxisAngle4d()

Constructs and initializes an AxisAngle4d to (0,0,1,0).

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.

Returns:Object

a clone of this instance.

Exceptions
OutOfMemoryError:
if there is not enough memory.
Since
vecmath 1.3
See Also
java.lang.Cloneable
epsilonEqualsback to summary
public boolean epsilonEquals(AxisAngle4d a1, double epsilon)

Returns true if the L-infinite distance between this axis-angle and axis-angle a1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2), abs(angle1-angle2)].

Parameters
a1:AxisAngle4d

the axis-angle to be compared to this axis-angle

epsilon:double

the threshold value

equalsback to summary
public boolean equals(AxisAngle4d a1)

Returns true if all of the data members of AxisAngle4d a1 are equal to the corresponding data members in this AxisAngle4d.

Parameters
a1:AxisAngle4d

the axis-angle with which the comparison is made

Returns:boolean

true or false

equalsback to summary
public boolean equals(Object o1)

Overrides java.lang.Object.equals.

Returns true if the Object o1 is of type AxisAngle4d and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4d.

Parameters
o1:Object

the object with which the comparison is made

Returns:boolean

true or false

getback to summary
public final void get(double[] a)

Gets the value of this axis angle and places it into the array a of length four in x,y,z,angle order.

Parameters
a:double[]

the array of length four

getAngleback to summary
public final double getAngle()

Get the axis angle, in radians.
An axis angle is a rotation angle about the vector (x,y,z).

Returns:double

the angle, in radians.

Since
vecmath 1.5
getXback to summary
public double getX()

Get value of x coordinate.

Returns:double

the x coordinate.

Since
vecmath 1.5
getYback to summary
public final double getY()

Get value of y coordinate.

Returns:double

the y coordinate.

Since
vecmath 1.5
getZback to summary
public double getZ()

Get value of z coordinate.

Returns:double

the z coordinate.

Since
vecmath 1.5
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object. Two different AxisAngle4d objects with identical data values (i.e., AxisAngle4d.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.

Returns:int

the integer hash code value

setback to summary
public final void set(double x, double y, double z, double angle)

Sets the value of this axis angle to the specified x,y,z,angle.

Parameters
x:double

the x coordinate

y:double

the y coordinate

z:double

the z coordinate

angle:double

the angle of rotation in radians

setback to summary
public final void set(double[] a)

Sets the value of this axis angle to the specified x,y,z,angle.

Parameters
a:double[]

the array of length 4 containing x,y,z,angle in order

setback to summary
public final void set(AxisAngle4d a1)

Sets the value of this axis angle to the value of axis angle a1.

Parameters
a1:AxisAngle4d

the axis angle to be copied

setback to summary
public final void set(AxisAngle4f a1)

Sets the value of this axis angle to the value of axis angle a1.

Parameters
a1:AxisAngle4f

the axis angle to be copied

setback to summary
public final void set(Vector3d axis, double angle)

Sets the value of this AxisAngle4d to the specified axis and angle.

Parameters
axis:Vector3d

the axis

angle:double

the angle of rotation in radians

Since
vecmath 1.2
setback to summary
public final void set(Matrix4f m1)

Sets the value of this axis-angle to the rotational component of the passed matrix. If the specified matrix has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
m1:Matrix4f

the matrix4f

setback to summary
public final void set(Matrix4d m1)

Sets the value of this axis-angle to the rotational component of the passed matrix. If the specified matrix has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
m1:Matrix4d

the matrix4d

setback to summary
public final void set(Matrix3f m1)

Sets the value of this axis-angle to the rotational component of the passed matrix. If the specified matrix has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
m1:Matrix3f

the matrix3f

setback to summary
public final void set(Matrix3d m1)

Sets the value of this axis-angle to the rotational component of the passed matrix. If the specified matrix has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
m1:Matrix3d

the matrix3d

setback to summary
public final void set(Quat4f q1)

Sets the value of this axis-angle to the rotational equivalent of the passed quaternion. If the specified quaternion has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
q1:Quat4f

the Quat4f

setback to summary
public final void set(Quat4d q1)

Sets the value of this axis-angle to the rotational equivalent of the passed quaternion. If the specified quaternion has no rotational component, the value of this AxisAngle4d is set to an angle of 0 about an axis of (0,1,0).

Parameters
q1:Quat4d

the Quat4d

setAngleback to summary
public final void setAngle(double angle)

Set the axis angle, in radians.
An axis angle is a rotation angle about the vector (x,y,z).

Parameters
angle:double

The angle to set, in radians.

Since
vecmath 1.5
setXback to summary
public final void setX(double x)

Set a new value for x coordinate.

Parameters
x:double

the x coordinate.

Since
vecmath 1.5
setYback to summary
public final void setY(double y)

Set a new value for y coordinate.

Parameters
y:double

the y coordinate.

Since
vecmath 1.5
setZback to summary
public final void setZ(double z)

Set a new value for z coordinate.

Parameters
z:double

the z coordinate.

Since
vecmath 1.5
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this AxisAngle4d. The form is (x,y,z,angle).

Returns:String

the String representation