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

Public Member Functions

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

Static Public Member Functions

static meshlib.Vector4f diagonal (float a)
static int elements ()

Static Public Attributes

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

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

four-dimensional vector Generated from class MR::Vector4f.

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

Constructor & Destructor Documentation

◆ Vector4f() [1/4]

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

◆ Vector4f() [2/4]

meshlib.Vector4f.Vector4f ( )

Constructs an empty (default-constructed) instance.

Calls MR_Vector4f_DefaultConstruct().

◆ Vector4f() [3/4]

meshlib.Vector4f.Vector4f ( meshlib.NoInit _1)

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

Calls MR_Vector4f_Construct_1().

◆ Vector4f() [4/4]

meshlib.Vector4f.Vector4f ( float x,
float y,
float z,
float w )

Generated from constructor MR::Vector4f::Vector4f.

Calls MR_Vector4f_Construct_4().

Member Function Documentation

◆ copy()

Vector4f meshlib.Vector4f.copy ( )

A copy of the struct, in its own memory.

◆ diagonal()

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

Generated from method MR::Vector4f::diagonal.

Calls MR_Vector4f_diagonal().

◆ elements()

int meshlib.Vector4f.elements ( )
static

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

Calls MR_Vector4f_Get_elements().

◆ index()

float meshlib.Vector4f.index ( int e)

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

Calls MR_Vector4f_index().

◆ index_mut()

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

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

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

◆ isFinite()

boolean meshlib.Vector4f.isFinite ( )

Generated from method MR::Vector4f::isFinite.

Calls MR_Vector4f_isFinite().

◆ length()

float meshlib.Vector4f.length ( )

Generated from method MR::Vector4f::length.

Calls MR_Vector4f_length().

◆ lengthSq()

float meshlib.Vector4f.lengthSq ( )

Generated from method MR::Vector4f::lengthSq.

Calls MR_Vector4f_lengthSq().

◆ normalized()

meshlib.Vector4f meshlib.Vector4f.normalized ( )

Generated from method MR::Vector4f::normalized.

Calls MR_Vector4f_normalized().

◆ proj3d()

meshlib.Vector3f meshlib.Vector4f.proj3d ( )

assuming this is a point represented in homogeneous 4D coordinates, returns the point as 3D-vector Generated from method MR::Vector4f::proj3d.

Calls MR_Vector4f_proj3d().

◆ set()

void meshlib.Vector4f.set ( Vector4f other)

Overwrites the contents with those of another struct.

◆ setW()

void meshlib.Vector4f.setW ( float value)

◆ setX()

void meshlib.Vector4f.setX ( float value)

◆ setY()

void meshlib.Vector4f.setY ( float value)

◆ setZ()

void meshlib.Vector4f.setZ ( float value)

◆ w()

float meshlib.Vector4f.w ( )

◆ x()

float meshlib.Vector4f.x ( )

◆ y()

float meshlib.Vector4f.y ( )

◆ z()

float meshlib.Vector4f.z ( )

Member Data Documentation

◆ LAYOUT

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

The native layout of the struct.

◆ OFF_w

final long meshlib.Vector4f.OFF_w = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("w"))
static

◆ OFF_x

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

◆ OFF_y

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

◆ OFF_z

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

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