@NoOffset @Properties(inherit=LinearMath.class) public class btMatrix3x3 extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
btMatrix3x3()
\brief No initializaion constructor
|
btMatrix3x3(btMatrix3x3 other)
\brief Copy constructor
|
btMatrix3x3(btQuaternion q)
\brief Constructor from Quaternion
|
btMatrix3x3(btVector3 v0,
btVector3 v1,
btVector3 v2) |
btMatrix3x3(double xx,
double xy,
double xz,
double yx,
double yy,
double yz,
double zx,
double zy,
double zz)
\brief Constructor with row major formatting
|
btMatrix3x3(long size)
Native array allocator.
|
btMatrix3x3(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
btMatrix3x3 |
absolute()
\brief Return the matrix with all values non negative
|
btMatrix3x3 |
addPut(btMatrix3x3 m)
\brief Adds by the target matrix on the right
|
btMatrix3x3 |
adjoint()
\brief Return the adjoint of the matrix
|
double |
cofac(int r1,
int c1,
int r2,
int c2)
\brief Calculate the matrix cofactor
|
void |
deSerialize(btMatrix3x3DoubleData dataIn) |
void |
deSerializeDouble(btMatrix3x3DoubleData dataIn) |
void |
deSerializeFloat(btMatrix3x3FloatData dataIn) |
double |
determinant()
\brief Return the determinant of the matrix
|
void |
diagonalize(btMatrix3x3 rot,
double threshold,
int maxSteps)
\brief diagonalizes this matrix by the Jacobi method.
|
void |
extractRotation(btQuaternion q) |
void |
extractRotation(btQuaternion q,
double tolerance,
int maxIter)
extractRotation is from "A robust method to extract the rotational part of deformations"
See http://dl.acm.org/citation.cfm?doid=2994258.2994269
decomposes a matrix A in a orthogonal matrix R and a
symmetric matrix S:
A = R*S.
|
btVector3 |
get(int i)
\brief Get a mutable reference to a row of the matrix as a vector
|
btVector3 |
getColumn(int i)
\brief Get a column of the matrix as a vector
|
void |
getEulerYPR(double[] yaw,
double[] pitch,
double[] roll) |
void |
getEulerYPR(DoubleBuffer yaw,
DoubleBuffer pitch,
DoubleBuffer roll) |
void |
getEulerYPR(DoublePointer yaw,
DoublePointer pitch,
DoublePointer roll)
\brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
|
void |
getEulerZYX(double[] yaw,
double[] pitch,
double[] roll) |
void |
getEulerZYX(double[] yaw,
double[] pitch,
double[] roll,
int solution_number) |
void |
getEulerZYX(DoubleBuffer yaw,
DoubleBuffer pitch,
DoubleBuffer roll) |
void |
getEulerZYX(DoubleBuffer yaw,
DoubleBuffer pitch,
DoubleBuffer roll,
int solution_number) |
void |
getEulerZYX(DoublePointer yaw,
DoublePointer pitch,
DoublePointer roll) |
void |
getEulerZYX(DoublePointer yaw,
DoublePointer pitch,
DoublePointer roll,
int solution_number)
\brief Get the matrix represented as euler angles around ZYX
|
static btMatrix3x3 |
getIdentity() |
void |
getOpenGLSubMatrix(double[] m) |
void |
getOpenGLSubMatrix(DoubleBuffer m) |
void |
getOpenGLSubMatrix(DoublePointer m)
\brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective
|
btMatrix3x3 |
getPointer(long i) |
void |
getRotation(btQuaternion q)
\brief Get the matrix represented as a quaternion
|
btVector3 |
getRow(int i)
\brief Get a row of the matrix as a vector
|
btMatrix3x3 |
inverse()
\brief Return the inverse of the matrix
|
btMatrix3x3 |
multiplyPut(btMatrix3x3 m)
\brief Multiply by the target matrix on the right
|
btMatrix3x3 |
position(long position) |
btMatrix3x3 |
put(btMatrix3x3 other)
\brief Assignment Operator
|
btMatrix3x3 |
scaled(btVector3 s)
\brief Create a scaled copy of the matrix
|
void |
serialize(btMatrix3x3DoubleData dataOut) |
void |
serializeFloat(btMatrix3x3FloatData dataOut) |
void |
setEulerYPR(double yaw,
double pitch,
double roll)
\brief Set the matrix from euler angles using YPR around YXZ respectively
|
void |
setEulerZYX(double eulerX,
double eulerY,
double eulerZ)
\brief Set the matrix from euler angles YPR around ZYX axes
|
void |
setFromOpenGLSubMatrix(double[] m) |
void |
setFromOpenGLSubMatrix(DoubleBuffer m) |
void |
setFromOpenGLSubMatrix(DoublePointer m)
\brief Set from the rotational part of a 4x4 OpenGL matrix
|
void |
setIdentity()
\brief Set the matrix to the identity
|
void |
setRotation(btQuaternion q)
\brief Set the matrix from a quaternion
|
void |
setValue(double xx,
double xy,
double xz,
double yx,
double yy,
double yz,
double zx,
double zy,
double zz)
\brief Set the values of the matrix explicitly (row major)
|
void |
setZero()
\brief Set the matrix to the identity
|
btVector3 |
solve33(btVector3 b)
Solve A * x = b, where b is a column vector.
|
btMatrix3x3 |
subtractPut(btMatrix3x3 m)
\brief Substractss by the target matrix on the right
|
double |
tdotx(btVector3 v) |
double |
tdoty(btVector3 v) |
double |
tdotz(btVector3 v) |
btMatrix3x3 |
timesTranspose(btMatrix3x3 m) |
btMatrix3x3 |
transpose()
\brief Return the transpose of the matrix
|
btMatrix3x3 |
transposeTimes(btMatrix3x3 m) |
address, 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 btMatrix3x3(Pointer p)
Pointer(Pointer).public btMatrix3x3(long size)
Pointer.position(long).public btMatrix3x3()
public btMatrix3x3(@Const @ByRef btQuaternion q)
public btMatrix3x3(@Cast(value="const btScalar") double xx, @Cast(value="const btScalar") double xy, @Cast(value="const btScalar") double xz, @Cast(value="const btScalar") double yx, @Cast(value="const btScalar") double yy, @Cast(value="const btScalar") double yz, @Cast(value="const btScalar") double zx, @Cast(value="const btScalar") double zy, @Cast(value="const btScalar") double zz)
public btMatrix3x3(@Const @ByRef btMatrix3x3 other)
public btMatrix3x3 position(long position)
public btMatrix3x3 getPointer(long i)
getPointer in class Pointer@ByRef @Name(value="operator =") public btMatrix3x3 put(@Const @ByRef btMatrix3x3 other)
@ByVal public btVector3 getColumn(int i)
i - Column number 0 indexed@Const @ByRef public btVector3 getRow(int i)
i - Row number 0 indexed@ByRef @Name(value="operator []") public btVector3 get(int i)
i - Row number 0 indexed@ByRef @Name(value="operator *=") public btMatrix3x3 multiplyPut(@Const @ByRef btMatrix3x3 m)
m - Rotation matrix to be applied
Equivilant to this = this * m@ByRef @Name(value="operator +=") public btMatrix3x3 addPut(@Const @ByRef btMatrix3x3 m)
m - matrix to be applied
Equivilant to this = this + m@ByRef @Name(value="operator -=") public btMatrix3x3 subtractPut(@Const @ByRef btMatrix3x3 m)
m - matrix to be applied
Equivilant to this = this - mpublic void setFromOpenGLSubMatrix(@Cast(value="const btScalar*") DoublePointer m)
m - A pointer to the beginning of the array of scalarspublic void setFromOpenGLSubMatrix(@Cast(value="const btScalar*") DoubleBuffer m)
public void setFromOpenGLSubMatrix(@Cast(value="const btScalar*") double[] m)
public void setValue(@Cast(value="const btScalar") double xx, @Cast(value="const btScalar") double xy, @Cast(value="const btScalar") double xz, @Cast(value="const btScalar") double yx, @Cast(value="const btScalar") double yy, @Cast(value="const btScalar") double yz, @Cast(value="const btScalar") double zx, @Cast(value="const btScalar") double zy, @Cast(value="const btScalar") double zz)
xx - Top leftxy - Top Middlexz - Top Rightyx - Middle Leftyy - Middle Middleyz - Middle Rightzx - Bottom Leftzy - Bottom Middlezz - Bottom Rightpublic void setRotation(@Const @ByRef btQuaternion q)
q - The Quaternion to matchpublic void setEulerYPR(@Cast(value="const btScalar") double yaw, @Cast(value="const btScalar") double pitch, @Cast(value="const btScalar") double roll)
yaw - Yaw about Y axispitch - Pitch about X axisroll - Roll about Z axispublic void setEulerZYX(@Cast(value="btScalar") double eulerX, @Cast(value="btScalar") double eulerY, @Cast(value="btScalar") double eulerZ)
eulerX - Roll about X axiseulerY - Pitch around Y axiseulerZ - Yaw about Z axis
These angles are used to produce a rotation matrix. The euler
angles are applied in ZYX order. I.e a vector is first rotated
about X then Y and then Zpublic void setIdentity()
public void setZero()
@Const @ByRef public static btMatrix3x3 getIdentity()
public void getOpenGLSubMatrix(@Cast(value="btScalar*") DoublePointer m)
m - The array to be filledpublic void getOpenGLSubMatrix(@Cast(value="btScalar*") DoubleBuffer m)
public void getRotation(@ByRef btQuaternion q)
q - The quaternion which will be setpublic void getEulerYPR(@Cast(value="btScalar*") @ByRef DoublePointer yaw, @Cast(value="btScalar*") @ByRef DoublePointer pitch, @Cast(value="btScalar*") @ByRef DoublePointer roll)
yaw - Yaw around Y axispitch - Pitch around X axisroll - around Z axispublic void getEulerYPR(@Cast(value="btScalar*") @ByRef DoubleBuffer yaw, @Cast(value="btScalar*") @ByRef DoubleBuffer pitch, @Cast(value="btScalar*") @ByRef DoubleBuffer roll)
public void getEulerYPR(@Cast(value="btScalar*") @ByRef double[] yaw, @Cast(value="btScalar*") @ByRef double[] pitch, @Cast(value="btScalar*") @ByRef double[] roll)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef DoublePointer yaw, @Cast(value="btScalar*") @ByRef DoublePointer pitch, @Cast(value="btScalar*") @ByRef DoublePointer roll, @Cast(value="unsigned int") int solution_number)
yaw - Yaw around Z axispitch - Pitch around Y axisroll - around X axissolution_number - Which solution of two possible solutions ( 1 or 2) are possible valuespublic void getEulerZYX(@Cast(value="btScalar*") @ByRef DoublePointer yaw, @Cast(value="btScalar*") @ByRef DoublePointer pitch, @Cast(value="btScalar*") @ByRef DoublePointer roll)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef DoubleBuffer yaw, @Cast(value="btScalar*") @ByRef DoubleBuffer pitch, @Cast(value="btScalar*") @ByRef DoubleBuffer roll, @Cast(value="unsigned int") int solution_number)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef DoubleBuffer yaw, @Cast(value="btScalar*") @ByRef DoubleBuffer pitch, @Cast(value="btScalar*") @ByRef DoubleBuffer roll)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef double[] yaw, @Cast(value="btScalar*") @ByRef double[] pitch, @Cast(value="btScalar*") @ByRef double[] roll, @Cast(value="unsigned int") int solution_number)
public void getEulerZYX(@Cast(value="btScalar*") @ByRef double[] yaw, @Cast(value="btScalar*") @ByRef double[] pitch, @Cast(value="btScalar*") @ByRef double[] roll)
@ByVal public btMatrix3x3 scaled(@Const @ByRef btVector3 s)
s - Scaling vector The elements of the vector will scale each column@Cast(value="btScalar") public double determinant()
@ByVal public btMatrix3x3 adjoint()
@ByVal public btMatrix3x3 absolute()
@ByVal public btMatrix3x3 transpose()
@ByVal public btMatrix3x3 inverse()
@ByVal public btVector3 solve33(@Const @ByRef btVector3 b)
@ByVal public btMatrix3x3 transposeTimes(@Const @ByRef btMatrix3x3 m)
@ByVal public btMatrix3x3 timesTranspose(@Const @ByRef btMatrix3x3 m)
public void extractRotation(@ByRef btQuaternion q, @Cast(value="btScalar") double tolerance, int maxIter)
public void extractRotation(@ByRef btQuaternion q)
public void diagonalize(@ByRef btMatrix3x3 rot, @Cast(value="btScalar") double threshold, int maxSteps)
rot - stores the rotation from the coordinate system in which the matrix is diagonal to the original
coordinate system, i.e., old_this = rot * new_this * rot^T.threshold - See iterationiteration - The iteration stops when all off-diagonal elements are less than the threshold multiplied
by the sum of the absolute values of the diagonal, or when maxSteps have been executed.
Note that this matrix is assumed to be symmetric.@Cast(value="btScalar") public double cofac(int r1, int c1, int r2, int c2)
r1 - The first row to use for calculating the cofactorc1 - The first column to use for calculating the cofactorr1 - The second row to use for calculating the cofactorc1 - The second column to use for calculating the cofactor
See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more detailspublic void serialize(@ByRef btMatrix3x3DoubleData dataOut)
public void serializeFloat(@ByRef btMatrix3x3FloatData dataOut)
public void deSerialize(@Const @ByRef btMatrix3x3DoubleData dataIn)
public void deSerializeFloat(@Const @ByRef btMatrix3x3FloatData dataIn)
public void deSerializeDouble(@Const @ByRef btMatrix3x3DoubleData dataIn)
Copyright © 2024. All rights reserved.