Top Description Fields Constructors Methods
javax.vecmath

public Class AxisAngle4f

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

A four-element axis angle represented by single-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 float
angle

The angle of rotation in radians.

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

The x coordinate.

public float
y

The y coordinate.

public float
z

The z coordinate.

Constructor Summary

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

Constructs and initializes a AxisAngle4f from the specified xyzw coordinates.

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

Constructs and initializes an AxisAngle4f from the array of length 4.

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

Constructs and initializes an AxisAngle4f from the specified AxisAngle4f.

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

Constructs and initializes an AxisAngle4f from the specified AxisAngle4d.

public
AxisAngle4f(Vector3f
the axis
axis
,
float
the angle of rotation in radians
angle
)

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

public
AxisAngle4f()

Constructs and initializes an AxisAngle4f 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(AxisAngle4f
the axis-angle to be compared to this axis-angle
a1
,
float
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
(AxisAngle4f
the axis-angle with which the comparison is made
a1
)

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

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 AxisAngle4f and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4f.
public final void
get(float[]
the array
a
)

Copies the value of this axis-angle into the array a.

public final float

Returns:

Returns the angle, in radians.
getAngle
()

Get the axis angle, in radians.

public final float

Returns:

the x coordinate.
getX
()

Get value of x coordinate.

public final float

Returns:

the y coordinate
getY
()

Get value of y coordinate.

public final float

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(float
the x coordinate
x
,
float
the y coordinate
y
,
float
the z coordinate
z
,
float
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(float[]
the array of length 4 containing x,y,z,angle in order
a
)

Sets the value of this axis-angle to the specified values in the array of length 4.

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(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(Vector3f
the axis
axis
,
float
the angle of rotation in radians
angle
)

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

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
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
setAngle(float
The angle to set, in radians.
angle
)

Set the axis angle, in radians.

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

Set a new value for x coordinate.

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

Set a new value for y coordinate.

public final void
setZ(float
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 AxisAngle4f.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

angleback to summary
public float 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 float x

The x coordinate.

yback to summary
public float y

The y coordinate.

zback to summary
public float z

The z coordinate.

Constructor Detail

AxisAngle4fback to summary
public AxisAngle4f(float x, float y, float z, float angle)

Constructs and initializes a AxisAngle4f from the specified xyzw coordinates.

Parameters
x:float

the x coordinate

y:float

the y coordinate

z:float

the z coordinate

angle:float

the angle of rotation in radians

AxisAngle4fback to summary
public AxisAngle4f(float[] a)

Constructs and initializes an AxisAngle4f from the array of length 4.

Parameters
a:float[]

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

AxisAngle4fback to summary
public AxisAngle4f(AxisAngle4f a1)

Constructs and initializes an AxisAngle4f from the specified AxisAngle4f.

Parameters
a1:AxisAngle4f

the AxisAngle4f containing the initialization x y z angle data

AxisAngle4fback to summary
public AxisAngle4f(AxisAngle4d a1)

Constructs and initializes an AxisAngle4f from the specified AxisAngle4d.

Parameters
a1:AxisAngle4d

the AxisAngle4d containing the initialization x y z angle data

AxisAngle4fback to summary
public AxisAngle4f(Vector3f axis, float angle)

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

Parameters
axis:Vector3f

the axis

angle:float

the angle of rotation in radians

Since
vecmath 1.2
AxisAngle4fback to summary
public AxisAngle4f()

Constructs and initializes an AxisAngle4f 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(AxisAngle4f a1, float 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:AxisAngle4f

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

epsilon:float

the threshold value

equalsback to summary
public boolean equals(AxisAngle4f a1)

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

Parameters
a1:AxisAngle4f

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 AxisAngle4f and all of the data members of o1 are equal to the corresponding data members in this AxisAngle4f.

Parameters
o1:Object

the object with which the comparison is made

Returns:boolean

true or false

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

Copies the value of this axis-angle into the array a.

Parameters
a:float[]

the array

getAngleback to summary
public final float getAngle()

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

Returns:float

Returns the angle, in radians.

Since
vecmath 1.5
getXback to summary
public final float getX()

Get value of x coordinate.

Returns:float

the x coordinate.

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

Get value of y coordinate.

Returns:float

the y coordinate

Since
vecmath 1.5
getZback to summary
public final float getZ()

Get value of z coordinate.

Returns:float

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 AxisAngle4f objects with identical data values (i.e., AxisAngle4f.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(float x, float y, float z, float angle)

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

Parameters
x:float

the x coordinate

y:float

the y coordinate

z:float

the z coordinate

angle:float

the angle of rotation in radians

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

Sets the value of this axis-angle to the specified values in the array of length 4.

Parameters
a:float[]

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

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(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(Vector3f axis, float angle)

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

Parameters
axis:Vector3f

the axis

angle:float

the angle of rotation in radians

Since
vecmath 1.2
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 AxisAngle4f 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 AxisAngle4f is set to an angle of 0 about an axis of (0,1,0).

Parameters
q1:Quat4d

the Quat4d

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 AxisAngle4f 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 AxisAngle4f 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 AxisAngle4f 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 AxisAngle4f is set to an angle of 0 about an axis of (0,1,0).

Parameters
m1:Matrix3d

the matrix3d

setAngleback to summary
public final void setAngle(float angle)

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

Parameters
angle:float

The angle to set, in radians.

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

Set a new value for x coordinate.

Parameters
x:float

the x coordinate.

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

Set a new value for y coordinate.

Parameters
y:float

the y coordinate.

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

Set a new value for z coordinate.

Parameters
z:float

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 AxisAngle4f. The form is (x,y,z,angle).

Returns:String

the String representation