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

Public Member Functions

 Vector2f (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Vector2f copy ()
void set (Vector2f other)
float x ()
void setX (float value)
float y ()
void setY (float value)
 Vector2f ()
 Vector2f (meshlib.NoInit _1)
 Vector2f (float x, float y)
float index (int e)
java.lang.foreign.MemorySegment index_mut (int e)
float lengthSq ()
float length ()
meshlib.Vector2f normalized ()
meshlib.Vector2f furthestBasisVector ()
meshlib.Vector2f perpendicular ()
boolean isFinite ()
Public Member Functions inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment rawPointer ()

Static Public Member Functions

static meshlib.Vector2f diagonal (float a)
static meshlib.Vector2f plusX ()
static meshlib.Vector2f plusY ()
static meshlib.Vector2f minusX ()
static meshlib.Vector2f minusY ()
static int elements ()

Static Public Attributes

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

Generated from class MR::Vector2f.

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

Constructor & Destructor Documentation

◆ Vector2f() [1/4]

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

◆ Vector2f() [2/4]

meshlib.Vector2f.Vector2f ( )

Constructs an empty (default-constructed) instance.

Calls MR_Vector2f_DefaultConstruct().

◆ Vector2f() [3/4]

meshlib.Vector2f.Vector2f ( meshlib.NoInit _1)

Generated from constructor MR::Vector2f::Vector2f. The reference to the parameter _1 might be preserved in the constructed object.

Calls MR_Vector2f_Construct_1().

◆ Vector2f() [4/4]

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

Generated from constructor MR::Vector2f::Vector2f.

Calls MR_Vector2f_Construct_2().

Member Function Documentation

◆ copy()

Vector2f meshlib.Vector2f.copy ( )

A copy of the struct, in its own memory.

◆ diagonal()

meshlib.Vector2f meshlib.Vector2f.diagonal ( float a)
static

Generated from method MR::Vector2f::diagonal.

Calls MR_Vector2f_diagonal().

◆ elements()

int meshlib.Vector2f.elements ( )
static

Returns a pointer to a member variable of class MR::Vector2f named elements.

Calls MR_Vector2f_Get_elements().

◆ furthestBasisVector()

meshlib.Vector2f meshlib.Vector2f.furthestBasisVector ( )

Generated from method MR::Vector2f::furthestBasisVector.

Calls MR_Vector2f_furthestBasisVector().

◆ index()

float meshlib.Vector2f.index ( int e)

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

Calls MR_Vector2f_index().

◆ index_mut()

java.lang.foreign.MemorySegment meshlib.Vector2f.index_mut ( int e)

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

Calls MR_Vector2f_index_mut(). Some types are raw C types, see the C bindings for the details.

◆ isFinite()

boolean meshlib.Vector2f.isFinite ( )

Generated from method MR::Vector2f::isFinite.

Calls MR_Vector2f_isFinite().

◆ length()

float meshlib.Vector2f.length ( )

Generated from method MR::Vector2f::length.

Calls MR_Vector2f_length().

◆ lengthSq()

float meshlib.Vector2f.lengthSq ( )

Generated from method MR::Vector2f::lengthSq.

Calls MR_Vector2f_lengthSq().

◆ minusX()

meshlib.Vector2f meshlib.Vector2f.minusX ( )
static

Generated from method MR::Vector2f::minusX.

Calls MR_Vector2f_minusX().

◆ minusY()

meshlib.Vector2f meshlib.Vector2f.minusY ( )
static

Generated from method MR::Vector2f::minusY.

Calls MR_Vector2f_minusY().

◆ normalized()

meshlib.Vector2f meshlib.Vector2f.normalized ( )

Generated from method MR::Vector2f::normalized.

Calls MR_Vector2f_normalized().

◆ perpendicular()

meshlib.Vector2f meshlib.Vector2f.perpendicular ( )

returns same length vector orthogonal to this (rotated 90 degrees counter-clockwise) Generated from method MR::Vector2f::perpendicular.

Calls MR_Vector2f_perpendicular().

◆ plusX()

meshlib.Vector2f meshlib.Vector2f.plusX ( )
static

Generated from method MR::Vector2f::plusX.

Calls MR_Vector2f_plusX().

◆ plusY()

meshlib.Vector2f meshlib.Vector2f.plusY ( )
static

Generated from method MR::Vector2f::plusY.

Calls MR_Vector2f_plusY().

◆ set()

void meshlib.Vector2f.set ( Vector2f other)

Overwrites the contents with those of another struct.

◆ setX()

void meshlib.Vector2f.setX ( float value)

◆ setY()

void meshlib.Vector2f.setY ( float value)

◆ x()

float meshlib.Vector2f.x ( )

◆ y()

float meshlib.Vector2f.y ( )

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_x

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

◆ OFF_y

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

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