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

Public Member Functions

 Color (java.lang.foreign.MemorySegment segment, java.lang.Object owner)
Color copy ()
void set (Color other)
byte r ()
void setR (byte value)
byte g ()
void setG (byte value)
byte b ()
void setB (byte value)
byte a ()
void setA (byte value)
 Color ()
 Color (meshlib.NoInit _1)
 Color (int r, int g, int b, int a)
 Color (int r, int g, int b)
 Color (float r, float g, float b, float a)
 Color (float r, float g, float b)
 Color (meshlib.Vector4i vec)
 Color (meshlib.Vector4f vec)
meshlib.Vector4i convertTo_MR_Vector4i ()
meshlib.Vector4f convertTo_MR_Vector4f ()
int getUInt32 ()
byte index (int e)
java.lang.foreign.MemorySegment index_mut (int e)
meshlib.Color add_assign (meshlib.Color other)
meshlib.Color sub_assign (meshlib.Color other)
meshlib.Color mul_assign (float m)
meshlib.Color div_assign (float m)
meshlib.Color scaledAlpha (float m)
boolean isTranslucent ()
Public Member Functions inherited from meshlib.CppStruct
final java.lang.foreign.MemorySegment rawPointer ()

Static Public Member Functions

static meshlib.Color white ()
static meshlib.Color black ()
static meshlib.Color gray ()
static meshlib.Color red ()
static meshlib.Color green ()
static meshlib.Color blue ()
static meshlib.Color yellow ()
static meshlib.Color brown ()
static meshlib.Color purple ()
static meshlib.Color transparent ()
static byte valToUint8 (int val)
static byte valToUint8 (float val)

Static Public Attributes

static final java.lang.foreign.StructLayout LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"r", "g", "b", "a"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE})
static final long OFF_r = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("r"))
static final long OFF_g = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("g"))
static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b"))
static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a"))

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::Color.

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

Constructor & Destructor Documentation

◆ Color() [1/9]

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

◆ Color() [2/9]

meshlib.Color.Color ( )

Constructs an empty (default-constructed) instance.

Calls MR_Color_DefaultConstruct().

◆ Color() [3/9]

meshlib.Color.Color ( meshlib.NoInit _1)

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

Calls MR_Color_Construct_MR_NoInit().

◆ Color() [4/9]

meshlib.Color.Color ( int r,
int g,
int b,
int a )

Generated from constructor MR::Color::Color.

Calls MR_Color_Construct().

◆ Color() [5/9]

meshlib.Color.Color ( int r,
int g,
int b )

Generated from constructor MR::Color::Color.

Calls MR_Color_Construct_rgb().

◆ Color() [6/9]

meshlib.Color.Color ( float r,
float g,
float b,
float a )

Generated from constructor MR::Color::Color.

Calls MR_Color_Construct_float().

◆ Color() [7/9]

meshlib.Color.Color ( float r,
float g,
float b )

Generated from constructor MR::Color::Color.

Calls MR_Color_Construct_rgbFloat().

◆ Color() [8/9]

meshlib.Color.Color ( meshlib.Vector4i vec)

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

Calls MR_Color_Construct_int().

◆ Color() [9/9]

meshlib.Color.Color ( meshlib.Vector4f vec)

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

Calls MR_Color_Construct_float_MR_Vector4f().

Member Function Documentation

◆ a()

byte meshlib.Color.a ( )

◆ add_assign()

meshlib.Color meshlib.Color.add_assign ( meshlib.Color other)

Generated from method MR::Color::operator+=. The reference to this object might be preserved in the return value.

Calls MR_Color_add_assign().

◆ b()

byte meshlib.Color.b ( )

◆ black()

meshlib.Color meshlib.Color.black ( )
static

Generated from method MR::Color::black.

Calls MR_Color_black().

◆ blue()

meshlib.Color meshlib.Color.blue ( )
static

Generated from method MR::Color::blue.

Calls MR_Color_blue().

◆ brown()

meshlib.Color meshlib.Color.brown ( )
static

Generated from method MR::Color::brown.

Calls MR_Color_brown().

◆ convertTo_MR_Vector4f()

meshlib.Vector4f meshlib.Color.convertTo_MR_Vector4f ( )

Generated from conversion operator MR::Color::operator MR::Vector4f.

Calls MR_Color_ConvertTo_MR_Vector4f().

◆ convertTo_MR_Vector4i()

meshlib.Vector4i meshlib.Color.convertTo_MR_Vector4i ( )

Generated from conversion operator MR::Color::operator MR::Vector4i.

Calls MR_Color_ConvertTo_MR_Vector4i().

◆ copy()

Color meshlib.Color.copy ( )

A copy of the struct, in its own memory.

◆ div_assign()

meshlib.Color meshlib.Color.div_assign ( float m)

Generated from method MR::Color::operator/=. The reference to this object might be preserved in the return value.

Calls MR_Color_div_assign().

◆ g()

byte meshlib.Color.g ( )

◆ getUInt32()

int meshlib.Color.getUInt32 ( )

Generated from method MR::Color::getUInt32.

Calls MR_Color_getUInt32().

◆ gray()

meshlib.Color meshlib.Color.gray ( )
static

Generated from method MR::Color::gray.

Calls MR_Color_gray().

◆ green()

meshlib.Color meshlib.Color.green ( )
static

Generated from method MR::Color::green.

Calls MR_Color_green().

◆ index()

byte meshlib.Color.index ( int e)

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

Calls MR_Color_index().

◆ index_mut()

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

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

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

◆ isTranslucent()

boolean meshlib.Color.isTranslucent ( )

returns true if the color is neither fully opaque nor fully transparent, so it has to be blended with the colors behind Generated from method MR::Color::isTranslucent.

Calls MR_Color_isTranslucent().

◆ mul_assign()

meshlib.Color meshlib.Color.mul_assign ( float m)

Generated from method MR::Color::operator*=. The reference to this object might be preserved in the return value.

Calls MR_Color_mul_assign().

◆ purple()

meshlib.Color meshlib.Color.purple ( )
static

Generated from method MR::Color::purple.

Calls MR_Color_purple().

◆ r()

byte meshlib.Color.r ( )

◆ red()

meshlib.Color meshlib.Color.red ( )
static

Generated from method MR::Color::red.

Calls MR_Color_red().

◆ scaledAlpha()

meshlib.Color meshlib.Color.scaledAlpha ( float m)

Generated from method MR::Color::scaledAlpha.

Calls MR_Color_scaledAlpha().

◆ set()

void meshlib.Color.set ( Color other)

Overwrites the contents with those of another struct.

◆ setA()

void meshlib.Color.setA ( byte value)

◆ setB()

void meshlib.Color.setB ( byte value)

◆ setG()

void meshlib.Color.setG ( byte value)

◆ setR()

void meshlib.Color.setR ( byte value)

◆ sub_assign()

meshlib.Color meshlib.Color.sub_assign ( meshlib.Color other)

Generated from method MR::Color::operator-=. The reference to this object might be preserved in the return value.

Calls MR_Color_sub_assign().

◆ transparent()

meshlib.Color meshlib.Color.transparent ( )
static

Generated from method MR::Color::transparent.

Calls MR_Color_transparent().

◆ valToUint8() [1/2]

byte meshlib.Color.valToUint8 ( float val)
static

Generated from method MR::Color::valToUint8<float>.

Calls MR_Color_valToUint8_float().

◆ valToUint8() [2/2]

byte meshlib.Color.valToUint8 ( int val)
static

Generated from method MR::Color::valToUint8<int>.

Calls MR_Color_valToUint8_int().

◆ white()

meshlib.Color meshlib.Color.white ( )
static

Generated from method MR::Color::white.

Calls MR_Color_white().

◆ yellow()

meshlib.Color meshlib.Color.yellow ( )
static

Generated from method MR::Color::yellow.

Calls MR_Color_yellow().

Member Data Documentation

◆ LAYOUT

final java.lang.foreign.StructLayout meshlib.Color.LAYOUT = meshlib.Ffi.structLayout(new java.lang.String[]{"r", "g", "b", "a"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_BYTE})
static

The native layout of the struct.

◆ OFF_a

final long meshlib.Color.OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a"))
static

◆ OFF_b

final long meshlib.Color.OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b"))
static

◆ OFF_g

final long meshlib.Color.OFF_g = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("g"))
static

◆ OFF_r

final long meshlib.Color.OFF_r = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("r"))
static

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