Package org.lwjgl.util.msdfgen
Class MSDFGenTransform
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct msdf_transform {
struct msdf_vector2 scale;
struct msdf_vector2 translation;
struct msdf_range distance_mapping;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionMSDFGenTransform(ByteBuffer container) Creates aMSDFGenTransforminstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic MSDFGenTransformcalloc()Returns a newMSDFGenTransforminstance allocated withmemCalloc.static MSDFGenTransform.Buffercalloc(int capacity) Returns a newMSDFGenTransform.Bufferinstance allocated withmemCalloc.static MSDFGenTransform.Buffercalloc(int capacity, MemoryStack stack) Returns a newMSDFGenTransform.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSDFGenTransformcalloc(MemoryStack stack) Returns a newMSDFGenTransforminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static MSDFGenTransformcreate()Returns a newMSDFGenTransforminstance allocated withBufferUtils.static MSDFGenTransform.Buffercreate(int capacity) Returns a newMSDFGenTransform.Bufferinstance allocated withBufferUtils.static MSDFGenTransformcreate(long address) Returns a newMSDFGenTransforminstance for the specified memory address.static MSDFGenTransform.Buffercreate(long address, int capacity) Create aMSDFGenTransform.Bufferinstance at the specified memory.static @Nullable MSDFGenTransformcreateSafe(long address) static @Nullable MSDFGenTransform.BuffercreateSafe(long address, int capacity) distance_mapping(Consumer<MSDFGenRange> consumer) Passes thedistance_mappingfield to the specifiedConsumer.distance_mapping(MSDFGenRange value) Copies the specifiedMSDFGenRangeto thedistance_mappingfield.static MSDFGenTransformmalloc()Returns a newMSDFGenTransforminstance allocated withmemAlloc.static MSDFGenTransform.Buffermalloc(int capacity) Returns a newMSDFGenTransform.Bufferinstance allocated withmemAlloc.static MSDFGenTransform.Buffermalloc(int capacity, MemoryStack stack) Returns a newMSDFGenTransform.Bufferinstance allocated on the specifiedMemoryStack.static MSDFGenTransformmalloc(MemoryStack stack) Returns a newMSDFGenTransforminstance allocated on the specifiedMemoryStack.static MSDFGenRangendistance_mapping(long struct) Unsafe version ofdistance_mapping().static voidndistance_mapping(long struct, MSDFGenRange value) Unsafe version ofdistance_mapping.static MSDFGenVector2nscale(long struct) Unsafe version ofscale().static voidnscale(long struct, MSDFGenVector2 value) Unsafe version ofscale.static MSDFGenVector2ntranslation(long struct) Unsafe version oftranslation().static voidntranslation(long struct, MSDFGenVector2 value) Unsafe version oftranslation.scale()scale(Consumer<MSDFGenVector2> consumer) Passes thescalefield to the specifiedConsumer.scale(MSDFGenVector2 value) Copies the specifiedMSDFGenVector2to thescalefield.set(MSDFGenTransform src) Copies the specified struct data to this struct.set(MSDFGenVector2 scale, MSDFGenVector2 translation, MSDFGenRange distance_mapping) Initializes this struct with the specified values.intsizeof()Returnssizeof(struct).translation(Consumer<MSDFGenVector2> consumer) Passes thetranslationfield to the specifiedConsumer.translation(MSDFGenVector2 value) Copies the specifiedMSDFGenVector2to thetranslationfield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SCALE
public static final int SCALEThe struct member offsets. -
TRANSLATION
public static final int TRANSLATIONThe struct member offsets. -
DISTANCE_MAPPING
public static final int DISTANCE_MAPPINGThe struct member offsets.
-
-
Constructor Details
-
MSDFGenTransform
Creates aMSDFGenTransforminstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<MSDFGenTransform>
-
scale
- Returns:
- a
MSDFGenVector2view of thescalefield.
-
translation
- Returns:
- a
MSDFGenVector2view of thetranslationfield.
-
distance_mapping
- Returns:
- a
MSDFGenRangeview of thedistance_mappingfield.
-
scale
Copies the specifiedMSDFGenVector2to thescalefield. -
scale
Passes thescalefield to the specifiedConsumer. -
translation
Copies the specifiedMSDFGenVector2to thetranslationfield. -
translation
Passes thetranslationfield to the specifiedConsumer. -
distance_mapping
Copies the specifiedMSDFGenRangeto thedistance_mappingfield. -
distance_mapping
Passes thedistance_mappingfield to the specifiedConsumer. -
set
public MSDFGenTransform set(MSDFGenVector2 scale, MSDFGenVector2 translation, MSDFGenRange distance_mapping) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newMSDFGenTransforminstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newMSDFGenTransforminstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newMSDFGenTransforminstance allocated withBufferUtils. -
create
Returns a newMSDFGenTransforminstance for the specified memory address. -
createSafe
-
malloc
Returns a newMSDFGenTransform.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newMSDFGenTransform.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newMSDFGenTransform.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aMSDFGenTransform.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newMSDFGenTransforminstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newMSDFGenTransforminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newMSDFGenTransform.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newMSDFGenTransform.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nscale
Unsafe version ofscale(). -
ntranslation
Unsafe version oftranslation(). -
ndistance_mapping
Unsafe version ofdistance_mapping(). -
nscale
Unsafe version ofscale. -
ntranslation
Unsafe version oftranslation. -
ndistance_mapping
Unsafe version ofdistance_mapping.
-