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

Public Member Functions

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

Static Public Member Functions

static meshlib.Matrix2d zero ()
static meshlib.Matrix2d identity ()
static meshlib.Matrix2d scale (double s)
static meshlib.Matrix2d scale (double sx, double sy)
static meshlib.Matrix2d scale (meshlib.Vector2d s)
static meshlib.Matrix2d rotation (double angle)
static meshlib.Matrix2d rotation (meshlib.Vector2d from, meshlib.Vector2d to)
static meshlib.Matrix2d fromRows (meshlib.Vector2d x, meshlib.Vector2d y)
static meshlib.Matrix2d fromColumns (meshlib.Vector2d x, meshlib.Vector2d y)

Static Public Attributes

static final java.lang.foreign.StructLayout LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"x", "y"}, new java.lang.foreign.MemoryLayout[]{meshlib.Vector2d.LAYOUT, meshlib.Vector2d.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"))

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 2x2 matrix Generated from class MR::Matrix2d.

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

Constructor & Destructor Documentation

◆ Matrix2d() [1/3]

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

◆ Matrix2d() [2/3]

meshlib.Matrix2d.Matrix2d ( )

Constructs an empty (default-constructed) instance.

Calls MR_Matrix2d_DefaultConstruct().

◆ Matrix2d() [3/3]

meshlib.Matrix2d.Matrix2d ( meshlib.Vector2d x,
meshlib.Vector2d y )

initializes matrix from its 2 rows Generated from constructor MR::Matrix2d::Matrix2d. 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.

Calls MR_Matrix2d_Construct().

Member Function Documentation

◆ col()

meshlib.Vector2d meshlib.Matrix2d.col ( int i)

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

Calls MR_Matrix2d_col().

◆ copy()

Matrix2d meshlib.Matrix2d.copy ( )

A copy of the struct, in its own memory.

◆ det()

double meshlib.Matrix2d.det ( )

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

Calls MR_Matrix2d_det().

◆ fromColumns()

meshlib.Matrix2d meshlib.Matrix2d.fromColumns ( meshlib.Vector2d x,
meshlib.Vector2d y )
static

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

Calls MR_Matrix2d_fromColumns().

◆ fromRows()

meshlib.Matrix2d meshlib.Matrix2d.fromRows ( meshlib.Vector2d x,
meshlib.Vector2d y )
static

constructs a matrix from its 2 rows Generated from method MR::Matrix2d::fromRows.

Calls MR_Matrix2d_fromRows().

◆ identity()

meshlib.Matrix2d meshlib.Matrix2d.identity ( )
static

Generated from method MR::Matrix2d::identity.

Calls MR_Matrix2d_identity().

◆ index()

meshlib.Vector2d meshlib.Matrix2d.index ( int row)

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

Calls MR_Matrix2d_index().

◆ index_mut()

meshlib.Vector2d meshlib.Matrix2d.index_mut ( int row)

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

Calls MR_Matrix2d_index_mut().

◆ inverse()

meshlib.Matrix2d meshlib.Matrix2d.inverse ( )

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

Calls MR_Matrix2d_inverse().

◆ norm()

double meshlib.Matrix2d.norm ( )

Generated from method MR::Matrix2d::norm.

Calls MR_Matrix2d_norm().

◆ normSq()

double meshlib.Matrix2d.normSq ( )

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

Calls MR_Matrix2d_normSq().

◆ rotation() [1/2]

meshlib.Matrix2d meshlib.Matrix2d.rotation ( double angle)
static

creates matrix representing rotation around origin on given angle Generated from method MR::Matrix2d::rotation.

Calls MR_Matrix2d_rotation_1().

◆ rotation() [2/2]

meshlib.Matrix2d meshlib.Matrix2d.rotation ( meshlib.Vector2d from,
meshlib.Vector2d to )
static

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

Calls MR_Matrix2d_rotation_2().

◆ scale() [1/3]

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

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

Calls MR_Matrix2d_scale_1_double().

◆ scale() [2/3]

meshlib.Matrix2d meshlib.Matrix2d.scale ( double sx,
double sy )
static

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

Calls MR_Matrix2d_scale_2().

◆ scale() [3/3]

meshlib.Matrix2d meshlib.Matrix2d.scale ( meshlib.Vector2d s)
static

Generated from method MR::Matrix2d::scale.

Calls MR_Matrix2d_scale_1_MR_Vector2d().

◆ set()

void meshlib.Matrix2d.set ( Matrix2d other)

Overwrites the contents with those of another struct.

◆ setX()

void meshlib.Matrix2d.setX ( meshlib.Vector2d value)

◆ setY()

void meshlib.Matrix2d.setY ( meshlib.Vector2d value)

◆ trace()

double meshlib.Matrix2d.trace ( )

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

Calls MR_Matrix2d_trace().

◆ transposed()

meshlib.Matrix2d meshlib.Matrix2d.transposed ( )

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

Calls MR_Matrix2d_transposed().

◆ x()

meshlib.Vector2d meshlib.Matrix2d.x ( )

rows, identity matrix by default

◆ y()

meshlib.Vector2d meshlib.Matrix2d.y ( )

◆ zero()

meshlib.Matrix2d meshlib.Matrix2d.zero ( )
static

Generated from method MR::Matrix2d::zero.

Calls MR_Matrix2d_zero().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_x

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

◆ OFF_y

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

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