@Properties(inherit=Bullet3Common.class) public class b3Quaternion extends b3QuadWord
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
b3Quaternion()
\brief No initialization constructor
|
b3Quaternion(b3Vector3 _axis,
float _angle)
\brief Axis angle Constructor
|
b3Quaternion(float yaw,
float pitch,
float roll)
\brief Constructor from Euler angles
|
b3Quaternion(float _x,
float _y,
float _z,
float _w)
\brief Constructor from scalars
|
b3Quaternion(long size)
Native array allocator.
|
b3Quaternion(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
b3Quaternion |
add(b3Quaternion q2)
\brief Return the sum of this quaternion and the other
|
b3Quaternion |
addPut(b3Quaternion q)
\brief Add two quaternions
|
float |
angle(b3Quaternion q)
\brief Return the angle between this quaternion and the other
|
b3Quaternion |
divide(float s)
\brief Return an inversely scaled versionof this quaternion
|
b3Quaternion |
dividePut(float s)
\brief Inversely scale this quaternion
|
float |
dot(b3Quaternion q)
\brief Return the dot product between this quaternion and another
|
b3Quaternion |
farthest(b3Quaternion qd)
\todo document this and it's use
|
float |
getAngle()
\brief Return the angle of rotation represented by this quaternion
|
b3Vector3 |
getAxis()
\brief Return the axis of the rotation represented by this quaternion
|
void |
getEulerZYX(float[] yawZ,
float[] pitchY,
float[] rollX) |
void |
getEulerZYX(FloatBuffer yawZ,
FloatBuffer pitchY,
FloatBuffer rollX) |
void |
getEulerZYX(FloatPointer yawZ,
FloatPointer pitchY,
FloatPointer rollX)
\brief Get the euler angles from this quaternion
|
static b3Quaternion |
getIdentity() |
b3Quaternion |
getPointer(long i) |
float |
getW() |
b3Quaternion |
inverse()
\brief Return the inverse of this quaternion
|
float |
length()
\brief Return the length of the quaternion
|
float |
length2()
\brief Return the length squared of the quaternion
|
b3Quaternion |
multiply(float s)
\brief Return a scaled version of this quaternion
|
b3Quaternion |
multiplyPut(b3Quaternion q)
\brief Multiply this quaternion by q on the right
|
b3Quaternion |
multiplyPut(float s)
\brief Scale this quaternion
|
b3Quaternion |
nearest(b3Quaternion qd)
\todo document this and it's use
|
b3Quaternion |
normalize()
\brief Normalize the quaternion
Such that x^2 + y^2 + z^2 +w^2 = 1
|
b3Quaternion |
normalized()
\brief Return a normalized version of this quaternion
|
b3Quaternion |
position(long position) |
void |
setEuler(float yaw,
float pitch,
float roll)
\brief Set the quaternion using Euler angles
|
void |
setEulerZYX(float yawZ,
float pitchY,
float rollX)
\brief Set the quaternion using euler angles
|
void |
setRotation(b3Vector3 axis1,
float _angle)
\brief Set the rotation using axis angle notation
|
b3Quaternion |
slerp(b3Quaternion q,
float t)
\brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion
|
b3Quaternion |
subtract()
\brief Return the negative of this quaternion
This simply negates each element
|
b3Quaternion |
subtract(b3Quaternion q2)
\brief Return the difference between this quaternion and the other
|
b3Quaternion |
subtractPut(b3Quaternion q)
\brief Subtract out a quaternion
|
asFloatPointer, equals, getX, getY, getZ, m_floats, m_floats, m_floats, notEquals, setMax, setMin, setValue, setValue, setW, setX, setY, setZ, w, w, x, x, y, y, z, zaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic b3Quaternion(Pointer p)
Pointer(Pointer).public b3Quaternion(long size)
Pointer.position(long).public b3Quaternion()
public b3Quaternion(@Cast(value="const b3Scalar") float _x, @Cast(value="const b3Scalar") float _y, @Cast(value="const b3Scalar") float _z, @Cast(value="const b3Scalar") float _w)
public b3Quaternion(@Const @ByRef b3Vector3 _axis, @Cast(value="const b3Scalar") float _angle)
axis - The axis which the rotation is aroundangle - The magnitude of the rotation around the angle (Radians)public b3Quaternion(@Cast(value="const b3Scalar") float yaw, @Cast(value="const b3Scalar") float pitch, @Cast(value="const b3Scalar") float roll)
yaw - Angle around Y unless B3_EULER_DEFAULT_ZYX defined then Zpitch - Angle around X unless B3_EULER_DEFAULT_ZYX defined then Yroll - Angle around Z unless B3_EULER_DEFAULT_ZYX defined then Xpublic b3Quaternion position(long position)
position in class b3QuadWordpublic b3Quaternion getPointer(long i)
getPointer in class b3QuadWordpublic void setRotation(@Const @ByRef b3Vector3 axis1, @Cast(value="const b3Scalar") float _angle)
axis - The axis around which to rotateangle - The magnitude of the rotation in Radianspublic void setEuler(@Cast(value="const b3Scalar") float yaw, @Cast(value="const b3Scalar") float pitch, @Cast(value="const b3Scalar") float roll)
yaw - Angle around Ypitch - Angle around Xroll - Angle around Zpublic void setEulerZYX(@Cast(value="const b3Scalar") float yawZ, @Cast(value="const b3Scalar") float pitchY, @Cast(value="const b3Scalar") float rollX)
yaw - Angle around Zpitch - Angle around Yroll - Angle around Xpublic void getEulerZYX(@Cast(value="b3Scalar*") @ByRef FloatPointer yawZ, @Cast(value="b3Scalar*") @ByRef FloatPointer pitchY, @Cast(value="b3Scalar*") @ByRef FloatPointer rollX)
yaw - Angle around Zpitch - Angle around Yroll - Angle around Xpublic void getEulerZYX(@Cast(value="b3Scalar*") @ByRef FloatBuffer yawZ, @Cast(value="b3Scalar*") @ByRef FloatBuffer pitchY, @Cast(value="b3Scalar*") @ByRef FloatBuffer rollX)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef float[] yawZ, @Cast(value="b3Scalar*") @ByRef float[] pitchY, @Cast(value="b3Scalar*") @ByRef float[] rollX)
@ByRef @Name(value="operator +=") public b3Quaternion addPut(@Const @ByRef b3Quaternion q)
q - The quaternion to add to this one@ByRef @Name(value="operator -=") public b3Quaternion subtractPut(@Const @ByRef b3Quaternion q)
q - The quaternion to subtract from this one@ByRef @Name(value="operator *=") public b3Quaternion multiplyPut(@Cast(value="const b3Scalar") float s)
s - The scalar to scale by@ByRef @Name(value="operator *=") public b3Quaternion multiplyPut(@Const @ByRef b3Quaternion q)
q - The other quaternion
Equivilant to this = this * q@Cast(value="b3Scalar") public float dot(@Const @ByRef b3Quaternion q)
q - The other quaternion@Cast(value="b3Scalar") public float length2()
@ByRef public b3Quaternion normalize()
@ByVal @Name(value="operator *") public b3Quaternion multiply(@Cast(value="const b3Scalar") float s)
s - The scale factor@ByVal @Name(value="operator /") public b3Quaternion divide(@Cast(value="const b3Scalar") float s)
s - The inverse scale factor@ByRef @Name(value="operator /=") public b3Quaternion dividePut(@Cast(value="const b3Scalar") float s)
s - The scale factor@ByVal public b3Quaternion normalized()
@Cast(value="b3Scalar") public float angle(@Const @ByRef b3Quaternion q)
q - The other quaternion@Cast(value="b3Scalar") public float getAngle()
@ByVal public b3Vector3 getAxis()
@ByVal public b3Quaternion inverse()
@ByVal @Name(value="operator +") public b3Quaternion add(@Const @ByRef b3Quaternion q2)
q2 - The other quaternion@ByVal @Name(value="operator -") public b3Quaternion subtract(@Const @ByRef b3Quaternion q2)
q2 - The other quaternion@ByVal @Name(value="operator -") public b3Quaternion subtract()
@ByVal public b3Quaternion farthest(@Const @ByRef b3Quaternion qd)
@ByVal public b3Quaternion nearest(@Const @ByRef b3Quaternion qd)
@ByVal public b3Quaternion slerp(@Const @ByRef b3Quaternion q, @Cast(value="const b3Scalar") float t)
q - The other quaternion to interpolate witht - The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q.
Slerp interpolates assuming constant velocity.@Const @ByRef public static b3Quaternion getIdentity()
Copyright © 2024. All rights reserved.