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

Public Member Functions

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

Static Public Member Functions

static meshlib.Matrix2f zero ()
static meshlib.Matrix2f identity ()
static meshlib.Matrix2f scale (float s)
static meshlib.Matrix2f scale (float sx, float sy)
static meshlib.Matrix2f scale (meshlib.Vector2f s)
static meshlib.Matrix2f rotation (float angle)
static meshlib.Matrix2f rotation (meshlib.Vector2f from, meshlib.Vector2f to)
static meshlib.Matrix2f fromRows (meshlib.Vector2f x, meshlib.Vector2f y)
static meshlib.Matrix2f fromColumns (meshlib.Vector2f x, meshlib.Vector2f 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.Vector2f.LAYOUT, meshlib.Vector2f.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::Matrix2f.

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

Constructor & Destructor Documentation

◆ Matrix2f() [1/3]

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

◆ Matrix2f() [2/3]

meshlib.Matrix2f.Matrix2f ( )

Constructs an empty (default-constructed) instance.

Calls MR_Matrix2f_DefaultConstruct().

◆ Matrix2f() [3/3]

meshlib.Matrix2f.Matrix2f ( meshlib.Vector2f x,
meshlib.Vector2f y )

initializes matrix from its 2 rows Generated from constructor MR::Matrix2f::Matrix2f. 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_Matrix2f_Construct().

Member Function Documentation

◆ col()

meshlib.Vector2f meshlib.Matrix2f.col ( int i)

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

Calls MR_Matrix2f_col().

◆ copy()

Matrix2f meshlib.Matrix2f.copy ( )

A copy of the struct, in its own memory.

◆ det()

float meshlib.Matrix2f.det ( )

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

Calls MR_Matrix2f_det().

◆ fromColumns()

meshlib.Matrix2f meshlib.Matrix2f.fromColumns ( meshlib.Vector2f x,
meshlib.Vector2f 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::Matrix2f::fromColumns.

Calls MR_Matrix2f_fromColumns().

◆ fromRows()

meshlib.Matrix2f meshlib.Matrix2f.fromRows ( meshlib.Vector2f x,
meshlib.Vector2f y )
static

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

Calls MR_Matrix2f_fromRows().

◆ identity()

meshlib.Matrix2f meshlib.Matrix2f.identity ( )
static

Generated from method MR::Matrix2f::identity.

Calls MR_Matrix2f_identity().

◆ index()

meshlib.Vector2f meshlib.Matrix2f.index ( int row)

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

Calls MR_Matrix2f_index().

◆ index_mut()

meshlib.Vector2f meshlib.Matrix2f.index_mut ( int row)

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

Calls MR_Matrix2f_index_mut().

◆ inverse()

meshlib.Matrix2f meshlib.Matrix2f.inverse ( )

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

Calls MR_Matrix2f_inverse().

◆ norm()

float meshlib.Matrix2f.norm ( )

Generated from method MR::Matrix2f::norm.

Calls MR_Matrix2f_norm().

◆ normSq()

float meshlib.Matrix2f.normSq ( )

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

Calls MR_Matrix2f_normSq().

◆ rotation() [1/2]

meshlib.Matrix2f meshlib.Matrix2f.rotation ( float angle)
static

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

Calls MR_Matrix2f_rotation_1().

◆ rotation() [2/2]

meshlib.Matrix2f meshlib.Matrix2f.rotation ( meshlib.Vector2f from,
meshlib.Vector2f to )
static

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

Calls MR_Matrix2f_rotation_2().

◆ scale() [1/3]

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

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

Calls MR_Matrix2f_scale_1_float().

◆ scale() [2/3]

meshlib.Matrix2f meshlib.Matrix2f.scale ( float sx,
float sy )
static

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

Calls MR_Matrix2f_scale_2().

◆ scale() [3/3]

meshlib.Matrix2f meshlib.Matrix2f.scale ( meshlib.Vector2f s)
static

Generated from method MR::Matrix2f::scale.

Calls MR_Matrix2f_scale_1_MR_Vector2f().

◆ set()

void meshlib.Matrix2f.set ( Matrix2f other)

Overwrites the contents with those of another struct.

◆ setX()

void meshlib.Matrix2f.setX ( meshlib.Vector2f value)

◆ setY()

void meshlib.Matrix2f.setY ( meshlib.Vector2f value)

◆ trace()

float meshlib.Matrix2f.trace ( )

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

Calls MR_Matrix2f_trace().

◆ transposed()

meshlib.Matrix2f meshlib.Matrix2f.transposed ( )

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

Calls MR_Matrix2f_transposed().

◆ x()

meshlib.Vector2f meshlib.Matrix2f.x ( )

rows, identity matrix by default

◆ y()

meshlib.Vector2f meshlib.Matrix2f.y ( )

◆ zero()

meshlib.Matrix2f meshlib.Matrix2f.zero ( )
static

Generated from method MR::Matrix2f::zero.

Calls MR_Matrix2f_zero().

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_x

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

◆ OFF_y

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

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