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