MeshLib Java Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib.Matrix3f:

Public Member Functions

 Matrix3f (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Matrix3f copy ()
void set (Matrix3f other)
meshlib.Vector3f x ()
void setX (meshlib.Vector3f value)
meshlib.Vector3f y ()
void setY (meshlib.Vector3f value)
meshlib.Vector3f z ()
void setZ (meshlib.Vector3f value)
 Matrix3f ()
 Matrix3f (meshlib.Vector3f x, meshlib.Vector3f y, meshlib.Vector3f z)
 Matrix3f (meshlib.Matrix3d m)
meshlib.Vector3f index (int row)
meshlib.Vector3f index_mut (int row)
meshlib.Vector3f col (int i)
float trace ()
float normSq ()
float norm ()
float det ()
meshlib.Matrix3f inverse ()
meshlib.Matrix3f transposed ()
meshlib.Vector3f toEulerAngles ()
meshlib.Matrix3_float_QR qr ()
Public Member Functions inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment rawPointer ()

Static Public Member Functions

static meshlib.Matrix3f zero ()
static meshlib.Matrix3f identity ()
static meshlib.Matrix3f scale (float s)
static meshlib.Matrix3f scale (float sx, float sy, float sz)
static meshlib.Matrix3f scale (meshlib.Vector3f s)
static meshlib.Matrix3f rotation (meshlib.Vector3f axis, float angle)
static meshlib.Matrix3f rotation (meshlib.Vector3f from, meshlib.Vector3f to)
static meshlib.Matrix3f rotationFromEuler (meshlib.Vector3f eulerAngles)
static meshlib.Matrix3f approximateLinearRotationMatrixFromEuler (meshlib.Vector3f eulerAngles)
static meshlib.Matrix3f fromRows (meshlib.Vector3f x, meshlib.Vector3f y, meshlib.Vector3f z)
static meshlib.Matrix3f fromColumns (meshlib.Vector3f x, meshlib.Vector3f y, meshlib.Vector3f z)

Static Public Attributes

static final java.lang.foreign.StructLayout LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"x", "y", "z"}, new java.lang.foreign.MemoryLayout[]{meshlib.Vector3f.LAYOUT, meshlib.Vector3f.LAYOUT, meshlib.Vector3f.LAYOUT})
static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x"))
static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y"))
static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z"))

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppStruct
 CppStruct (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Protected Attributes inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment segment

Detailed Description

arbitrary 3x3 matrix Generated from class MR::Matrix3f.

Has the same layout as the C++ struct, the fields are accessed in place in native memory.

Constructor & Destructor Documentation

◆ Matrix3f() [1/4]

meshlib.Matrix3f.Matrix3f ( java.lang.foreign.MemorySegment segment,
java.lang.Object owner )

Wraps a segment holding the struct. owner is kept alive as long as this wrapper is. Not for normal use.

◆ Matrix3f() [2/4]

meshlib.Matrix3f.Matrix3f ( )

Constructs an empty (default-constructed) instance.

Calls MR_Matrix3f_DefaultConstruct().

◆ Matrix3f() [3/4]

meshlib.Matrix3f.Matrix3f ( meshlib.Vector3f x,
meshlib.Vector3f y,
meshlib.Vector3f z )

initializes matrix from its 3 rows Generated from constructor MR::Matrix3f::Matrix3f. The reference to the parameter x might be preserved in the constructed object. The reference to the parameter y might be preserved in the constructed object. The reference to the parameter z might be preserved in the constructed object.

Calls MR_Matrix3f_Construct().

◆ Matrix3f() [4/4]

meshlib.Matrix3f.Matrix3f ( meshlib.Matrix3d m)

Here T == U doesn't seem to cause any issues in the C++ code, but we're still disabling it because it somehow gets emitted when generating the bindings, and results in duplicate functions in C#. Generated from constructor MR::Matrix3f::Matrix3f. The reference to the parameter m might be preserved in the constructed object.

Calls MR_Matrix3f_Construct_double().

Member Function Documentation

◆ approximateLinearRotationMatrixFromEuler()

meshlib.Matrix3f meshlib.Matrix3f.approximateLinearRotationMatrixFromEuler ( meshlib.Vector3f eulerAngles)
static

returns linear by angles approximation of the rotation matrix, which is close to true rotation matrix for small angles Generated from method MR::Matrix3f::approximateLinearRotationMatrixFromEuler.

Calls MR_Matrix3f_approximateLinearRotationMatrixFromEuler().

◆ col()

meshlib.Vector3f meshlib.Matrix3f.col ( int i)

column access Generated from method MR::Matrix3f::col.

Calls MR_Matrix3f_col().

◆ copy()

Matrix3f meshlib.Matrix3f.copy ( )

A copy of the struct, in its own memory.

◆ det()

float meshlib.Matrix3f.det ( )

computes determinant of the matrix Generated from method MR::Matrix3f::det.

Calls MR_Matrix3f_det().

◆ fromColumns()

meshlib.Matrix3f meshlib.Matrix3f.fromColumns ( meshlib.Vector3f x,
meshlib.Vector3f y,
meshlib.Vector3f z )
static

constructs a matrix from its 3 columns; use this method to get the matrix that transforms basis vectors ( plusX, plusY, plusZ ) into vectors ( x, y, z ) respectively Generated from method MR::Matrix3f::fromColumns.

Calls MR_Matrix3f_fromColumns().

◆ fromRows()

meshlib.Matrix3f meshlib.Matrix3f.fromRows ( meshlib.Vector3f x,
meshlib.Vector3f y,
meshlib.Vector3f z )
static

constructs a matrix from its 3 rows Generated from method MR::Matrix3f::fromRows.

Calls MR_Matrix3f_fromRows().

◆ identity()

meshlib.Matrix3f meshlib.Matrix3f.identity ( )
static

Generated from method MR::Matrix3f::identity.

Calls MR_Matrix3f_identity().

◆ index()

meshlib.Vector3f meshlib.Matrix3f.index ( int row)

row access Generated from method MR::Matrix3f::operator[].

Calls MR_Matrix3f_index().

◆ index_mut()

meshlib.Vector3f meshlib.Matrix3f.index_mut ( int row)

Generated from method MR::Matrix3f::operator[].

Calls MR_Matrix3f_index_mut().

◆ inverse()

meshlib.Matrix3f meshlib.Matrix3f.inverse ( )

computes inverse matrix Generated from method MR::Matrix3f::inverse.

Calls MR_Matrix3f_inverse().

◆ norm()

float meshlib.Matrix3f.norm ( )

Generated from method MR::Matrix3f::norm.

Calls MR_Matrix3f_norm().

◆ normSq()

float meshlib.Matrix3f.normSq ( )

compute sum of squared matrix elements Generated from method MR::Matrix3f::normSq.

Calls MR_Matrix3f_normSq().

◆ qr()

meshlib.Matrix3_float_QR meshlib.Matrix3f.qr ( )

decompose this matrix on the product Q*R, where Q is orthogonal and R is upper triangular Generated from method MR::Matrix3f::qr.

Calls MR_Matrix3f_qr().

◆ rotation() [1/2]

meshlib.Matrix3f meshlib.Matrix3f.rotation ( meshlib.Vector3f axis,
float angle )
static

creates matrix representing rotation around given axis on given angle Generated from method MR::Matrix3f::rotation.

Calls MR_Matrix3f_rotation_float().

◆ rotation() [2/2]

meshlib.Matrix3f meshlib.Matrix3f.rotation ( meshlib.Vector3f from,
meshlib.Vector3f to )
static

creates matrix representing rotation that after application to (from) makes (to) vector Generated from method MR::Matrix3f::rotation.

Calls MR_Matrix3f_rotation_MR_Vector3f().

◆ rotationFromEuler()

meshlib.Matrix3f meshlib.Matrix3f.rotationFromEuler ( meshlib.Vector3f eulerAngles)
static

creates matrix representing rotation from 3 Euler angles: R=R(z)*R(y)*R(x) see more https://en.wikipedia.org/wiki/Euler_angles#Conventions_by_intrinsic_rotations Generated from method MR::Matrix3f::rotationFromEuler.

Calls MR_Matrix3f_rotationFromEuler().

◆ scale() [1/3]

meshlib.Matrix3f meshlib.Matrix3f.scale ( float s)
static

returns a matrix that scales uniformly Generated from method MR::Matrix3f::scale.

Calls MR_Matrix3f_scale_1_float().

◆ scale() [2/3]

meshlib.Matrix3f meshlib.Matrix3f.scale ( float sx,
float sy,
float sz )
static

returns a matrix that has its own scale along each axis Generated from method MR::Matrix3f::scale.

Calls MR_Matrix3f_scale_3().

◆ scale() [3/3]

meshlib.Matrix3f meshlib.Matrix3f.scale ( meshlib.Vector3f s)
static

Generated from method MR::Matrix3f::scale.

Calls MR_Matrix3f_scale_1_MR_Vector3f().

◆ set()

void meshlib.Matrix3f.set ( Matrix3f other)

Overwrites the contents with those of another struct.

◆ setX()

void meshlib.Matrix3f.setX ( meshlib.Vector3f value)

◆ setY()

void meshlib.Matrix3f.setY ( meshlib.Vector3f value)

◆ setZ()

void meshlib.Matrix3f.setZ ( meshlib.Vector3f value)

◆ toEulerAngles()

meshlib.Vector3f meshlib.Matrix3f.toEulerAngles ( )

returns 3 Euler angles, assuming this is a rotation matrix composed as follows: R=R(z)*R(y)*R(x) Generated from method MR::Matrix3f::toEulerAngles.

Calls MR_Matrix3f_toEulerAngles().

◆ trace()

float meshlib.Matrix3f.trace ( )

computes trace of the matrix Generated from method MR::Matrix3f::trace.

Calls MR_Matrix3f_trace().

◆ transposed()

meshlib.Matrix3f meshlib.Matrix3f.transposed ( )

computes transposed matrix Generated from method MR::Matrix3f::transposed.

Calls MR_Matrix3f_transposed().

◆ x()

meshlib.Vector3f meshlib.Matrix3f.x ( )

rows, identity matrix by default

◆ y()

meshlib.Vector3f meshlib.Matrix3f.y ( )

◆ z()

meshlib.Vector3f meshlib.Matrix3f.z ( )

◆ zero()

meshlib.Matrix3f meshlib.Matrix3f.zero ( )
static

Generated from method MR::Matrix3f::zero.

Calls MR_Matrix3f_zero().

Member Data Documentation

◆ LAYOUT

final java.lang.foreign.StructLayout meshlib.Matrix3f.LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"x", "y", "z"}, new java.lang.foreign.MemoryLayout[]{meshlib.Vector3f.LAYOUT, meshlib.Vector3f.LAYOUT, meshlib.Vector3f.LAYOUT})
static

The native layout of the struct.

◆ OFF_x

final long meshlib.Matrix3f.OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x"))
static

◆ OFF_y

final long meshlib.Matrix3f.OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y"))
static

◆ OFF_z

final long meshlib.Matrix3f.OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z"))
static

The documentation for this class was generated from the following file: