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

Public Member Functions

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

Static Public Member Functions

static meshlib.Matrix3d zero ()
static meshlib.Matrix3d identity ()
static meshlib.Matrix3d scale (double s)
static meshlib.Matrix3d scale (double sx, double sy, double sz)
static meshlib.Matrix3d scale (meshlib.Vector3d s)
static meshlib.Matrix3d rotation (meshlib.Vector3d axis, double angle)
static meshlib.Matrix3d rotation (meshlib.Vector3d from, meshlib.Vector3d to)
static meshlib.Matrix3d rotationFromEuler (meshlib.Vector3d eulerAngles)
static meshlib.Matrix3d approximateLinearRotationMatrixFromEuler (meshlib.Vector3d eulerAngles)
static meshlib.Matrix3d fromRows (meshlib.Vector3d x, meshlib.Vector3d y, meshlib.Vector3d z)
static meshlib.Matrix3d fromColumns (meshlib.Vector3d x, meshlib.Vector3d y, meshlib.Vector3d 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.Vector3d.LAYOUT, meshlib.Vector3d.LAYOUT, meshlib.Vector3d.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::Matrix3d.

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

Constructor & Destructor Documentation

◆ Matrix3d() [1/3]

meshlib.Matrix3d.Matrix3d ( 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.

◆ Matrix3d() [2/3]

meshlib.Matrix3d.Matrix3d ( )

Constructs an empty (default-constructed) instance.

Calls MR_Matrix3d_DefaultConstruct().

◆ Matrix3d() [3/3]

meshlib.Matrix3d.Matrix3d ( meshlib.Vector3d x,
meshlib.Vector3d y,
meshlib.Vector3d z )

initializes matrix from its 3 rows Generated from constructor MR::Matrix3d::Matrix3d. 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_Matrix3d_Construct().

Member Function Documentation

◆ approximateLinearRotationMatrixFromEuler()

meshlib.Matrix3d meshlib.Matrix3d.approximateLinearRotationMatrixFromEuler ( meshlib.Vector3d 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::Matrix3d::approximateLinearRotationMatrixFromEuler.

Calls MR_Matrix3d_approximateLinearRotationMatrixFromEuler().

◆ col()

meshlib.Vector3d meshlib.Matrix3d.col ( int i)

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

Calls MR_Matrix3d_col().

◆ copy()

Matrix3d meshlib.Matrix3d.copy ( )

A copy of the struct, in its own memory.

◆ det()

double meshlib.Matrix3d.det ( )

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

Calls MR_Matrix3d_det().

◆ fromColumns()

meshlib.Matrix3d meshlib.Matrix3d.fromColumns ( meshlib.Vector3d x,
meshlib.Vector3d y,
meshlib.Vector3d 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::Matrix3d::fromColumns.

Calls MR_Matrix3d_fromColumns().

◆ fromRows()

meshlib.Matrix3d meshlib.Matrix3d.fromRows ( meshlib.Vector3d x,
meshlib.Vector3d y,
meshlib.Vector3d z )
static

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

Calls MR_Matrix3d_fromRows().

◆ identity()

meshlib.Matrix3d meshlib.Matrix3d.identity ( )
static

Generated from method MR::Matrix3d::identity.

Calls MR_Matrix3d_identity().

◆ index()

meshlib.Vector3d meshlib.Matrix3d.index ( int row)

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

Calls MR_Matrix3d_index().

◆ index_mut()

meshlib.Vector3d meshlib.Matrix3d.index_mut ( int row)

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

Calls MR_Matrix3d_index_mut().

◆ inverse()

meshlib.Matrix3d meshlib.Matrix3d.inverse ( )

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

Calls MR_Matrix3d_inverse().

◆ norm()

double meshlib.Matrix3d.norm ( )

Generated from method MR::Matrix3d::norm.

Calls MR_Matrix3d_norm().

◆ normSq()

double meshlib.Matrix3d.normSq ( )

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

Calls MR_Matrix3d_normSq().

◆ qr()

meshlib.Matrix3_double_QR meshlib.Matrix3d.qr ( )

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

Calls MR_Matrix3d_qr().

◆ rotation() [1/2]

meshlib.Matrix3d meshlib.Matrix3d.rotation ( meshlib.Vector3d axis,
double angle )
static

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

Calls MR_Matrix3d_rotation_double().

◆ rotation() [2/2]

meshlib.Matrix3d meshlib.Matrix3d.rotation ( meshlib.Vector3d from,
meshlib.Vector3d to )
static

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

Calls MR_Matrix3d_rotation_MR_Vector3d().

◆ rotationFromEuler()

meshlib.Matrix3d meshlib.Matrix3d.rotationFromEuler ( meshlib.Vector3d 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::Matrix3d::rotationFromEuler.

Calls MR_Matrix3d_rotationFromEuler().

◆ scale() [1/3]

meshlib.Matrix3d meshlib.Matrix3d.scale ( double s)
static

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

Calls MR_Matrix3d_scale_1_double().

◆ scale() [2/3]

meshlib.Matrix3d meshlib.Matrix3d.scale ( double sx,
double sy,
double sz )
static

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

Calls MR_Matrix3d_scale_3().

◆ scale() [3/3]

meshlib.Matrix3d meshlib.Matrix3d.scale ( meshlib.Vector3d s)
static

Generated from method MR::Matrix3d::scale.

Calls MR_Matrix3d_scale_1_MR_Vector3d().

◆ set()

void meshlib.Matrix3d.set ( Matrix3d other)

Overwrites the contents with those of another struct.

◆ setX()

void meshlib.Matrix3d.setX ( meshlib.Vector3d value)

◆ setY()

void meshlib.Matrix3d.setY ( meshlib.Vector3d value)

◆ setZ()

void meshlib.Matrix3d.setZ ( meshlib.Vector3d value)

◆ toEulerAngles()

meshlib.Vector3d meshlib.Matrix3d.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::Matrix3d::toEulerAngles.

Calls MR_Matrix3d_toEulerAngles().

◆ trace()

double meshlib.Matrix3d.trace ( )

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

Calls MR_Matrix3d_trace().

◆ transposed()

meshlib.Matrix3d meshlib.Matrix3d.transposed ( )

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

Calls MR_Matrix3d_transposed().

◆ x()

meshlib.Vector3d meshlib.Matrix3d.x ( )

rows, identity matrix by default

◆ y()

meshlib.Vector3d meshlib.Matrix3d.y ( )

◆ z()

meshlib.Vector3d meshlib.Matrix3d.z ( )

◆ zero()

meshlib.Matrix3d meshlib.Matrix3d.zero ( )
static

Generated from method MR::Matrix3d::zero.

Calls MR_Matrix3d_zero().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_x

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

◆ OFF_y

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

◆ OFF_z

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

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