@NoOffset @Properties(inherit=Bullet3Common.class) public class b3Matrix3x3 extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
b3Matrix3x3()
\brief No initializaion constructor
|
b3Matrix3x3(b3Matrix3x3 other)
\brief Copy constructor
|
b3Matrix3x3(b3Quaternion q)
\brief Constructor from Quaternion
|
b3Matrix3x3(float xx,
float xy,
float xz,
float yx,
float yy,
float yz,
float zx,
float zy,
float zz)
\brief Constructor with row major formatting
|
b3Matrix3x3(long size)
Native array allocator.
|
b3Matrix3x3(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
b3Matrix3x3 |
absolute()
\brief Return the matrix with all values non negative
|
b3Matrix3x3 |
addPut(b3Matrix3x3 m)
\brief Adds by the target matrix on the right
|
b3Matrix3x3 |
adjoint()
\brief Return the adjoint of the matrix
|
float |
cofac(int r1,
int c1,
int r2,
int c2)
\brief Calculate the matrix cofactor
|
void |
deSerialize(b3Matrix3x3FloatData dataIn) |
void |
deSerializeDouble(b3Matrix3x3DoubleData dataIn) |
void |
deSerializeFloat(b3Matrix3x3FloatData dataIn) |
float |
determinant()
\brief Return the determinant of the matrix
|
void |
diagonalize(b3Matrix3x3 rot,
float threshold,
int maxSteps)
\brief diagonalizes this matrix by the Jacobi method.
|
b3Vector3 |
get(int i)
\brief Get a mutable reference to a row of the matrix as a vector
|
b3Vector3 |
getColumn(int i)
\brief Get a column of the matrix as a vector
|
void |
getEulerYPR(float[] yaw,
float[] pitch,
float[] roll) |
void |
getEulerYPR(FloatBuffer yaw,
FloatBuffer pitch,
FloatBuffer roll) |
void |
getEulerYPR(FloatPointer yaw,
FloatPointer pitch,
FloatPointer roll)
\brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
|
void |
getEulerZYX(float[] yaw,
float[] pitch,
float[] roll) |
void |
getEulerZYX(float[] yaw,
float[] pitch,
float[] roll,
int solution_number) |
void |
getEulerZYX(FloatBuffer yaw,
FloatBuffer pitch,
FloatBuffer roll) |
void |
getEulerZYX(FloatBuffer yaw,
FloatBuffer pitch,
FloatBuffer roll,
int solution_number) |
void |
getEulerZYX(FloatPointer yaw,
FloatPointer pitch,
FloatPointer roll) |
void |
getEulerZYX(FloatPointer yaw,
FloatPointer pitch,
FloatPointer roll,
int solution_number)
\brief Get the matrix represented as euler angles around ZYX
|
static b3Matrix3x3 |
getIdentity() |
void |
getOpenGLSubMatrix(float[] m) |
void |
getOpenGLSubMatrix(FloatBuffer m) |
void |
getOpenGLSubMatrix(FloatPointer m)
\brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective
|
b3Matrix3x3 |
getPointer(long i) |
void |
getRotation(b3Quaternion q)
\brief Get the matrix represented as a quaternion
|
b3Vector3 |
getRow(int i)
\brief Get a row of the matrix as a vector
|
b3Matrix3x3 |
inverse()
\brief Return the inverse of the matrix
|
b3Matrix3x3 |
multiplyPut(b3Matrix3x3 m)
\brief Multiply by the target matrix on the right
|
b3Matrix3x3 |
position(long position) |
b3Matrix3x3 |
put(b3Matrix3x3 other)
\brief Assignment Operator
|
b3Matrix3x3 |
scaled(b3Vector3 s)
\brief Create a scaled copy of the matrix
|
void |
serialize(b3Matrix3x3FloatData dataOut) |
void |
serializeFloat(b3Matrix3x3FloatData dataOut) |
void |
setEulerYPR(float yaw,
float pitch,
float roll)
\brief Set the matrix from euler angles using YPR around YXZ respectively
|
void |
setEulerZYX(float eulerX,
float eulerY,
float eulerZ)
\brief Set the matrix from euler angles YPR around ZYX axes
|
void |
setFromOpenGLSubMatrix(float[] m) |
void |
setFromOpenGLSubMatrix(FloatBuffer m) |
void |
setFromOpenGLSubMatrix(FloatPointer m)
\brief Set from the rotational part of a 4x4 OpenGL matrix
|
void |
setIdentity()
\brief Set the matrix to the identity
|
void |
setRotation(b3Quaternion q)
\brief Set the matrix from a quaternion
|
void |
setValue(float xx,
float xy,
float xz,
float yx,
float yy,
float yz,
float zx,
float zy,
float zz)
\brief Set the values of the matrix explicitly (row major)
|
b3Matrix3x3 |
subtractPut(b3Matrix3x3 m)
\brief Substractss by the target matrix on the right
|
float |
tdotx(b3Vector3 v) |
float |
tdoty(b3Vector3 v) |
float |
tdotz(b3Vector3 v) |
b3Matrix3x3 |
timesTranspose(b3Matrix3x3 m) |
b3Matrix3x3 |
transpose()
\brief Return the transpose of the matrix
|
b3Matrix3x3 |
transposeTimes(b3Matrix3x3 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 b3Matrix3x3(Pointer p)
Pointer(Pointer).public b3Matrix3x3(long size)
Pointer.position(long).public b3Matrix3x3()
public b3Matrix3x3(@Const @ByRef b3Quaternion q)
public b3Matrix3x3(@Cast(value="const b3Scalar") float xx, @Cast(value="const b3Scalar") float xy, @Cast(value="const b3Scalar") float xz, @Cast(value="const b3Scalar") float yx, @Cast(value="const b3Scalar") float yy, @Cast(value="const b3Scalar") float yz, @Cast(value="const b3Scalar") float zx, @Cast(value="const b3Scalar") float zy, @Cast(value="const b3Scalar") float zz)
public b3Matrix3x3(@Const @ByRef b3Matrix3x3 other)
public b3Matrix3x3 position(long position)
public b3Matrix3x3 getPointer(long i)
getPointer in class Pointer@ByRef @Name(value="operator =") public b3Matrix3x3 put(@Const @ByRef b3Matrix3x3 other)
@ByVal public b3Vector3 getColumn(int i)
i - Column number 0 indexed@Const @ByRef public b3Vector3 getRow(int i)
i - Row number 0 indexed@ByRef @Name(value="operator []") public b3Vector3 get(int i)
i - Row number 0 indexed@ByRef @Name(value="operator *=") public b3Matrix3x3 multiplyPut(@Const @ByRef b3Matrix3x3 m)
m - Rotation matrix to be applied
Equivilant to this = this * m@ByRef @Name(value="operator +=") public b3Matrix3x3 addPut(@Const @ByRef b3Matrix3x3 m)
m - matrix to be applied
Equivilant to this = this + m@ByRef @Name(value="operator -=") public b3Matrix3x3 subtractPut(@Const @ByRef b3Matrix3x3 m)
m - matrix to be applied
Equivilant to this = this - mpublic void setFromOpenGLSubMatrix(@Cast(value="const b3Scalar*") FloatPointer m)
m - A pointer to the beginning of the array of scalarspublic void setFromOpenGLSubMatrix(@Cast(value="const b3Scalar*") FloatBuffer m)
public void setValue(@Cast(value="const b3Scalar") float xx, @Cast(value="const b3Scalar") float xy, @Cast(value="const b3Scalar") float xz, @Cast(value="const b3Scalar") float yx, @Cast(value="const b3Scalar") float yy, @Cast(value="const b3Scalar") float yz, @Cast(value="const b3Scalar") float zx, @Cast(value="const b3Scalar") float zy, @Cast(value="const b3Scalar") float zz)
xx - Top leftxy - Top Middlexz - Top Rightyx - Middle Leftyy - Middle Middleyz - Middle Rightzx - Bottom Leftzy - Bottom Middlezz - Bottom Rightpublic void setRotation(@Const @ByRef b3Quaternion q)
q - The Quaternion to matchpublic void setEulerYPR(@Cast(value="const b3Scalar") float yaw, @Cast(value="const b3Scalar") float pitch, @Cast(value="const b3Scalar") float roll)
yaw - Yaw about Y axispitch - Pitch about X axisroll - Roll about Z axispublic void setEulerZYX(@Cast(value="b3Scalar") float eulerX, @Cast(value="b3Scalar") float eulerY, @Cast(value="b3Scalar") float eulerZ)
eulerX - Roll about X axiseulerY - Pitch around Y axiseulerZ - Yaw aboud 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()
@Const @ByRef public static b3Matrix3x3 getIdentity()
public void getOpenGLSubMatrix(@Cast(value="b3Scalar*") FloatPointer m)
m - The array to be filledpublic void getOpenGLSubMatrix(@Cast(value="b3Scalar*") FloatBuffer m)
public void getRotation(@ByRef b3Quaternion q)
q - The quaternion which will be setpublic void getEulerYPR(@Cast(value="b3Scalar*") @ByRef FloatPointer yaw, @Cast(value="b3Scalar*") @ByRef FloatPointer pitch, @Cast(value="b3Scalar*") @ByRef FloatPointer roll)
yaw - Yaw around Y axispitch - Pitch around X axisroll - around Z axispublic void getEulerYPR(@Cast(value="b3Scalar*") @ByRef FloatBuffer yaw, @Cast(value="b3Scalar*") @ByRef FloatBuffer pitch, @Cast(value="b3Scalar*") @ByRef FloatBuffer roll)
public void getEulerYPR(@Cast(value="b3Scalar*") @ByRef float[] yaw, @Cast(value="b3Scalar*") @ByRef float[] pitch, @Cast(value="b3Scalar*") @ByRef float[] roll)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef FloatPointer yaw, @Cast(value="b3Scalar*") @ByRef FloatPointer pitch, @Cast(value="b3Scalar*") @ByRef FloatPointer roll, @Cast(value="unsigned int") int solution_number)
yaw - Yaw around X 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="b3Scalar*") @ByRef FloatPointer yaw, @Cast(value="b3Scalar*") @ByRef FloatPointer pitch, @Cast(value="b3Scalar*") @ByRef FloatPointer roll)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef FloatBuffer yaw, @Cast(value="b3Scalar*") @ByRef FloatBuffer pitch, @Cast(value="b3Scalar*") @ByRef FloatBuffer roll, @Cast(value="unsigned int") int solution_number)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef FloatBuffer yaw, @Cast(value="b3Scalar*") @ByRef FloatBuffer pitch, @Cast(value="b3Scalar*") @ByRef FloatBuffer roll)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef float[] yaw, @Cast(value="b3Scalar*") @ByRef float[] pitch, @Cast(value="b3Scalar*") @ByRef float[] roll, @Cast(value="unsigned int") int solution_number)
public void getEulerZYX(@Cast(value="b3Scalar*") @ByRef float[] yaw, @Cast(value="b3Scalar*") @ByRef float[] pitch, @Cast(value="b3Scalar*") @ByRef float[] roll)
@ByVal public b3Matrix3x3 scaled(@Const @ByRef b3Vector3 s)
s - Scaling vector The elements of the vector will scale each column@Cast(value="b3Scalar") public float determinant()
@ByVal public b3Matrix3x3 adjoint()
@ByVal public b3Matrix3x3 absolute()
@ByVal public b3Matrix3x3 transpose()
@ByVal public b3Matrix3x3 inverse()
@ByVal public b3Matrix3x3 transposeTimes(@Const @ByRef b3Matrix3x3 m)
@ByVal public b3Matrix3x3 timesTranspose(@Const @ByRef b3Matrix3x3 m)
public void diagonalize(@ByRef b3Matrix3x3 rot, @Cast(value="b3Scalar") float 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="b3Scalar") public float 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 b3Matrix3x3FloatData dataOut)
public void serializeFloat(@ByRef b3Matrix3x3FloatData dataOut)
public void deSerialize(@Const @ByRef b3Matrix3x3FloatData dataIn)
public void deSerializeFloat(@Const @ByRef b3Matrix3x3FloatData dataIn)
public void deSerializeDouble(@Const @ByRef b3Matrix3x3DoubleData dataIn)
Copyright © 2024. All rights reserved.