public class AxisAngle4f extends Object implements Externalizable
This class uses single-precision components.
| Modifier and Type | Field and Description |
|---|---|
float |
angle
The angle in radians.
|
float |
x
The x-component of the rotation axis.
|
float |
y
The y-component of the rotation axis.
|
float |
z
The z-component of the rotation axis.
|
| Constructor and Description |
|---|
AxisAngle4f()
Create a new
AxisAngle4f with zero rotation about (0, 0, 1). |
AxisAngle4f(AxisAngle4f a)
Create a new
AxisAngle4f with the same values of a. |
AxisAngle4f(float angle,
float x,
float y,
float z)
Create a new
AxisAngle4f with the given values. |
AxisAngle4f(float angle,
Vector3fc v)
Create a new
AxisAngle4f with the given values. |
AxisAngle4f(Quaternionfc q)
Create a new
AxisAngle4f from the given Quaternionfc. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Matrix3d |
get(Matrix3d m)
Set the given
Matrix3d to a rotation transformation equivalent to this AxisAngle4f. |
Matrix3f |
get(Matrix3f m)
Set the given
Matrix3f to a rotation transformation equivalent to this AxisAngle4f. |
Matrix4d |
get(Matrix4d m)
Set the given
Matrix4d to a rotation transformation equivalent to this AxisAngle4f. |
Matrix4f |
get(Matrix4f m)
Set the given
Matrix4f to a rotation transformation equivalent to this AxisAngle4f. |
Quaterniond |
get(Quaterniond q)
Set the given
Quaterniond to be equivalent to this AxisAngle4f rotation. |
Quaternionf |
get(Quaternionf q)
Set the given
Quaternionf to be equivalent to this AxisAngle4f rotation. |
int |
hashCode() |
AxisAngle4f |
normalize()
Normalize the axis vector.
|
void |
readExternal(ObjectInput in) |
AxisAngle4f |
rotate(float ang)
Increase the rotation angle by the given amount.
|
AxisAngle4f |
set(AxisAngle4f a)
Set this
AxisAngle4f to the values of a. |
AxisAngle4f |
set(float angle,
float x,
float y,
float z)
Set this
AxisAngle4f to the given values. |
AxisAngle4f |
set(float angle,
Vector3fc v)
Set this
AxisAngle4f to the given values. |
AxisAngle4f |
set(Matrix3dc m)
Set this
AxisAngle4f to be equivalent to the rotation
of the given Matrix3dc. |
AxisAngle4f |
set(Matrix3fc m)
Set this
AxisAngle4f to be equivalent to the rotation
of the given Matrix3fc. |
AxisAngle4f |
set(Matrix4dc m)
Set this
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4dc. |
AxisAngle4f |
set(Matrix4fc m)
Set this
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4fc. |
AxisAngle4f |
set(Matrix4x3fc m)
Set this
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4x3fc. |
AxisAngle4f |
set(Quaterniondc q)
Set this
AxisAngle4f to be equivalent to the given
Quaterniondc. |
AxisAngle4f |
set(Quaternionfc q)
Set this
AxisAngle4f to be equivalent to the given
Quaternionfc. |
String |
toString()
Return a string representation of this
AxisAngle4f. |
String |
toString(NumberFormat formatter)
Return a string representation of this
AxisAngle4f by formatting the components with the given NumberFormat. |
Vector3f |
transform(Vector3f v)
Transform the given vector by the rotation transformation described by this
AxisAngle4f. |
Vector3f |
transform(Vector3fc v,
Vector3f dest)
Transform the given vector by the rotation transformation described by this
AxisAngle4f
and store the result in dest. |
Vector4f |
transform(Vector4f v)
Transform the given vector by the rotation transformation described by this
AxisAngle4f. |
Vector4f |
transform(Vector4fc v,
Vector4f dest)
Transform the given vector by the rotation transformation described by this
AxisAngle4f
and store the result in dest. |
void |
writeExternal(ObjectOutput out) |
public float angle
public float x
public float y
public float z
public AxisAngle4f()
AxisAngle4f with zero rotation about (0, 0, 1).public AxisAngle4f(AxisAngle4f a)
AxisAngle4f with the same values of a.a - the AngleAxis4f to copy the values frompublic AxisAngle4f(Quaternionfc q)
q - the quaternion from which to create the new AngleAxis4fpublic AxisAngle4f(float angle,
float x,
float y,
float z)
AxisAngle4f with the given values.angle - the angle in radiansx - the x-coordinate of the rotation axisy - the y-coordinate of the rotation axisz - the z-coordinate of the rotation axispublic AxisAngle4f(float angle,
Vector3fc v)
AxisAngle4f with the given values.angle - the angle in radiansv - the rotation axis as a Vector3fpublic AxisAngle4f set(AxisAngle4f a)
AxisAngle4f to the values of a.a - the AngleAxis4f to copy the values frompublic AxisAngle4f set(float angle, float x, float y, float z)
AxisAngle4f to the given values.angle - the angle in radiansx - the x-coordinate of the rotation axisy - the y-coordinate of the rotation axisz - the z-coordinate of the rotation axispublic AxisAngle4f set(float angle, Vector3fc v)
AxisAngle4f to the given values.angle - the angle in radiansv - the rotation axis as a Vector3fpublic AxisAngle4f set(Quaternionfc q)
AxisAngle4f to be equivalent to the given
Quaternionfc.q - the quaternion to set this AngleAxis4f frompublic AxisAngle4f set(Quaterniondc q)
AxisAngle4f to be equivalent to the given
Quaterniondc.q - the quaternion to set this AngleAxis4f frompublic AxisAngle4f set(Matrix3fc m)
AxisAngle4f to be equivalent to the rotation
of the given Matrix3fc.m - the Matrix3fc to set this AngleAxis4f frompublic AxisAngle4f set(Matrix3dc m)
AxisAngle4f to be equivalent to the rotation
of the given Matrix3dc.m - the Matrix3d to set this AngleAxis4f frompublic AxisAngle4f set(Matrix4fc m)
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4fc.m - the Matrix4fc to set this AngleAxis4f frompublic AxisAngle4f set(Matrix4x3fc m)
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4x3fc.m - the Matrix4x3fc to set this AngleAxis4f frompublic AxisAngle4f set(Matrix4dc m)
AxisAngle4f to be equivalent to the rotational component
of the given Matrix4dc.m - the Matrix4dc to set this AngleAxis4f frompublic Quaternionf get(Quaternionf q)
Quaternionf to be equivalent to this AxisAngle4f rotation.q - the quaternion to setQuaternionf.set(AxisAngle4f)public Quaterniond get(Quaterniond q)
Quaterniond to be equivalent to this AxisAngle4f rotation.q - the quaternion to setQuaterniond.set(AxisAngle4f)public Matrix4f get(Matrix4f m)
Matrix4f to a rotation transformation equivalent to this AxisAngle4f.m - the matrix to setMatrix4f.set(AxisAngle4f)public Matrix3f get(Matrix3f m)
Matrix3f to a rotation transformation equivalent to this AxisAngle4f.m - the matrix to setMatrix3f.set(AxisAngle4f)public Matrix4d get(Matrix4d m)
Matrix4d to a rotation transformation equivalent to this AxisAngle4f.m - the matrix to setMatrix4f.set(AxisAngle4f)public Matrix3d get(Matrix3d m)
Matrix3d to a rotation transformation equivalent to this AxisAngle4f.m - the matrix to setMatrix3f.set(AxisAngle4f)public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic AxisAngle4f normalize()
public AxisAngle4f rotate(float ang)
This method also takes care of wrapping around.
ang - the angle increasepublic Vector3f transform(Vector3f v)
AxisAngle4f.v - the vector to transformpublic Vector3f transform(Vector3fc v, Vector3f dest)
AxisAngle4f
and store the result in dest.v - the vector to transformdest - will hold the resultpublic Vector4f transform(Vector4f v)
AxisAngle4f.v - the vector to transformpublic Vector4f transform(Vector4fc v, Vector4f dest)
AxisAngle4f
and store the result in dest.v - the vector to transformdest - will hold the resultpublic String toString()
AxisAngle4f.
This method creates a new DecimalFormat on every invocation with the format string " 0.000E0;-".
public String toString(NumberFormat formatter)
AxisAngle4f by formatting the components with the given NumberFormat.formatter - the NumberFormat used to format the vector components withCopyright © 2015–2016 JOML. All rights reserved.