@Properties(inherit=LinearMath.class) public class btQuaternion extends btQuadWord
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
btQuaternion()
\brief No initialization constructor
|
btQuaternion(btVector3 _axis,
double _angle)
\brief Axis angle Constructor
|
btQuaternion(double yaw,
double pitch,
double roll)
\brief Constructor from Euler angles
|
btQuaternion(double _x,
double _y,
double _z,
double _w)
\brief Constructor from scalars
|
btQuaternion(long size)
Native array allocator.
|
btQuaternion(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
btQuaternion |
add(btQuaternion q2)
\brief Return the sum of this quaternion and the other
|
btQuaternion |
addPut(btQuaternion q)
\brief Add two quaternions
|
double |
angle(btQuaternion q)
\brief Return the ***half*** angle between this quaternion and the other
|
double |
angleShortestPath(btQuaternion q)
\brief Return the angle between this quaternion and the other along the shortest path
|
void |
deSerialize(btQuaternionDoubleData dataIn) |
void |
deSerialize(btQuaternionFloatData dataIn) |
void |
deSerializeDouble(btQuaternionDoubleData dataIn) |
void |
deSerializeFloat(btQuaternionFloatData dataIn) |
btQuaternion |
divide(double s)
\brief Return an inversely scaled versionof this quaternion
|
btQuaternion |
dividePut(double s)
\brief Inversely scale this quaternion
|
double |
dot(btQuaternion q)
\brief Return the dot product between this quaternion and another
|
btQuaternion |
farthest(btQuaternion qd)
\todo document this and it's use
|
double |
getAngle()
\brief Return the angle [0, 2Pi] of rotation represented by this quaternion
|
double |
getAngleShortestPath()
\brief Return the angle [0, Pi] of rotation represented by this quaternion along the shortest path
|
btVector3 |
getAxis()
\brief Return the axis of the rotation represented by this quaternion
|
void |
getEulerZYX(double[] yawZ,
double[] pitchY,
double[] rollX) |
void |
getEulerZYX(DoubleBuffer yawZ,
DoubleBuffer pitchY,
DoubleBuffer rollX) |
void |
getEulerZYX(DoublePointer yawZ,
DoublePointer pitchY,
DoublePointer rollX)
\brief Get the euler angles from this quaternion
|
static btQuaternion |
getIdentity() |
btQuaternion |
getPointer(long i) |
double |
getW() |
btQuaternion |
inverse()
\brief Return the inverse of this quaternion
|
double |
length()
\brief Return the length of the quaternion
|
double |
length2()
\brief Return the length squared of the quaternion
|
btQuaternion |
multiply(double s)
\brief Return a scaled version of this quaternion
|
btQuaternion |
multiplyPut(btQuaternion q)
\brief Multiply this quaternion by q on the right
|
btQuaternion |
multiplyPut(double s)
\brief Scale this quaternion
|
btQuaternion |
nearest(btQuaternion qd)
\todo document this and it's use
|
btQuaternion |
normalize()
\brief Normalize the quaternion
Such that x^2 + y^2 + z^2 +w^2 = 1
|
btQuaternion |
normalized()
\brief Return a normalized version of this quaternion
|
btQuaternion |
position(long position) |
btQuaternion |
safeNormalize() |
void |
serialize(btQuaternionDoubleData dataOut) |
void |
serializeDouble(btQuaternionDoubleData dataOut) |
void |
serializeFloat(btQuaternionFloatData dataOut) |
void |
setEuler(double yaw,
double pitch,
double roll)
\brief Set the quaternion using Euler angles
|
void |
setEulerZYX(double yawZ,
double pitchY,
double rollX)
\brief Set the quaternion using euler angles
|
void |
setRotation(btVector3 axis,
double _angle)
\brief Set the rotation using axis angle notation
|
btQuaternion |
slerp(btQuaternion q,
double t)
\brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion
|
btQuaternion |
subtract()
\brief Return the negative of this quaternion
This simply negates each element
|
btQuaternion |
subtract(btQuaternion q2)
\brief Return the difference between this quaternion and the other
|
btQuaternion |
subtractPut(btQuaternion q)
\brief Subtract out a quaternion
|
asDoublePointer, equals, getX, getY, getZ, notEquals, setMax, setMin, setValue, setValue, setW, setX, setY, setZ, w, x, y, 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 btQuaternion(Pointer p)
Pointer(Pointer).public btQuaternion(long size)
Pointer.position(long).public btQuaternion()
public btQuaternion(@Cast(value="const btScalar") double _x, @Cast(value="const btScalar") double _y, @Cast(value="const btScalar") double _z, @Cast(value="const btScalar") double _w)
public btQuaternion(@Const @ByRef btVector3 _axis, @Cast(value="const btScalar") double _angle)
axis - The axis which the rotation is aroundangle - The magnitude of the rotation around the angle (Radians)public btQuaternion(@Cast(value="const btScalar") double yaw, @Cast(value="const btScalar") double pitch, @Cast(value="const btScalar") double roll)
yaw - Angle around Y unless BT_EULER_DEFAULT_ZYX defined then Zpitch - Angle around X unless BT_EULER_DEFAULT_ZYX defined then Yroll - Angle around Z unless BT_EULER_DEFAULT_ZYX defined then Xpublic btQuaternion position(long position)
position in class btQuadWordpublic btQuaternion getPointer(long i)
getPointer in class btQuadWordpublic void setRotation(@Const @ByRef btVector3 axis, @Cast(value="const btScalar") double _angle)
axis - The axis around which to rotateangle - The magnitude of the rotation in Radianspublic void setEuler(@Cast(value="const btScalar") double yaw, @Cast(value="const btScalar") double pitch, @Cast(value="const btScalar") double roll)
yaw - Angle around Ypitch - Angle around Xroll - Angle around Zpublic void setEulerZYX(@Cast(value="const btScalar") double yawZ, @Cast(value="const btScalar") double pitchY, @Cast(value="const btScalar") double rollX)
yaw - Angle around Zpitch - Angle around Yroll - Angle around Xpublic void getEulerZYX(@Cast(value="btScalar*") @ByRef DoublePointer yawZ, @Cast(value="btScalar*") @ByRef DoublePointer pitchY, @Cast(value="btScalar*") @ByRef DoublePointer rollX)
yaw - Angle around Zpitch - Angle around Yroll - Angle around Xpublic void getEulerZYX(@Cast(value="btScalar*") @ByRef DoubleBuffer yawZ, @Cast(value="btScalar*") @ByRef DoubleBuffer pitchY, @Cast(value="btScalar*") @ByRef DoubleBuffer rollX)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef double[] yawZ, @Cast(value="btScalar*") @ByRef double[] pitchY, @Cast(value="btScalar*") @ByRef double[] rollX)
@ByRef @Name(value="operator +=") public btQuaternion addPut(@Const @ByRef btQuaternion q)
q - The quaternion to add to this one@ByRef @Name(value="operator -=") public btQuaternion subtractPut(@Const @ByRef btQuaternion q)
q - The quaternion to subtract from this one@ByRef @Name(value="operator *=") public btQuaternion multiplyPut(@Cast(value="const btScalar") double s)
s - The scalar to scale by@ByRef @Name(value="operator *=") public btQuaternion multiplyPut(@Const @ByRef btQuaternion q)
q - The other quaternion
Equivilant to this = this * q@Cast(value="btScalar") public double dot(@Const @ByRef btQuaternion q)
q - The other quaternion@Cast(value="btScalar") public double length2()
@ByRef public btQuaternion safeNormalize()
@ByRef public btQuaternion normalize()
@ByVal @Name(value="operator *") public btQuaternion multiply(@Cast(value="const btScalar") double s)
s - The scale factor@ByVal @Name(value="operator /") public btQuaternion divide(@Cast(value="const btScalar") double s)
s - The inverse scale factor@ByRef @Name(value="operator /=") public btQuaternion dividePut(@Cast(value="const btScalar") double s)
s - The scale factor@ByVal public btQuaternion normalized()
@Cast(value="btScalar") public double angle(@Const @ByRef btQuaternion q)
q - The other quaternion@Cast(value="btScalar") public double angleShortestPath(@Const @ByRef btQuaternion q)
q - The other quaternion@Cast(value="btScalar") public double getAngle()
@Cast(value="btScalar") public double getAngleShortestPath()
@ByVal public btVector3 getAxis()
@ByVal public btQuaternion inverse()
@ByVal @Name(value="operator +") public btQuaternion add(@Const @ByRef btQuaternion q2)
q2 - The other quaternion@ByVal @Name(value="operator -") public btQuaternion subtract(@Const @ByRef btQuaternion q2)
q2 - The other quaternion@ByVal @Name(value="operator -") public btQuaternion subtract()
@ByVal public btQuaternion farthest(@Const @ByRef btQuaternion qd)
@ByVal public btQuaternion nearest(@Const @ByRef btQuaternion qd)
@ByVal public btQuaternion slerp(@Const @ByRef btQuaternion q, @Cast(value="const btScalar") double 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 btQuaternion getIdentity()
public void serialize(@ByRef btQuaternionDoubleData dataOut)
public void deSerialize(@Const @ByRef btQuaternionFloatData dataIn)
public void deSerialize(@Const @ByRef btQuaternionDoubleData dataIn)
public void serializeFloat(@ByRef btQuaternionFloatData dataOut)
public void deSerializeFloat(@Const @ByRef btQuaternionFloatData dataIn)
public void serializeDouble(@ByRef btQuaternionDoubleData dataOut)
public void deSerializeDouble(@Const @ByRef btQuaternionDoubleData dataIn)
Copyright © 2024. All rights reserved.