Package org.lwjgl.openvr
Class DistortionCoordinates
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.DistortionCoordinates
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class DistortionCoordinates extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceUsed to return the post-distortion UVs for each color channel.UVs range from 0 to 1 with 0,0 in the upper left corner of the source render target. The 0,0 to 1,1 range covers a single eye.
Member documentation
rfRed[2]– the UVs for the red channelrfGreen[2]– the UVs for the green channelrfBlue[2]– the UVs for the blue channel
Layout
struct DistortionCoordinates_t { float rfRed[2]; float rfGreen[2]; float rfBlue[2]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDistortionCoordinates.BufferAn array ofDistortionCoordinatesstructs.
-
Constructor Summary
Constructors Constructor Description DistortionCoordinates(java.nio.ByteBuffer container)Creates aDistortionCoordinatesinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DistortionCoordinatescalloc()Returns a newDistortionCoordinatesinstance allocated withmemCalloc.static DistortionCoordinates.Buffercalloc(int capacity)Returns a newDistortionCoordinates.Bufferinstance allocated withmemCalloc.static DistortionCoordinatescallocStack()Returns a newDistortionCoordinatesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static DistortionCoordinates.BuffercallocStack(int capacity)Returns a newDistortionCoordinates.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static DistortionCoordinates.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newDistortionCoordinates.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static DistortionCoordinatescallocStack(org.lwjgl.system.MemoryStack stack)Returns a newDistortionCoordinatesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static DistortionCoordinatescreate()Returns a newDistortionCoordinatesinstance allocated withBufferUtils.static DistortionCoordinates.Buffercreate(int capacity)Returns a newDistortionCoordinates.Bufferinstance allocated withBufferUtils.static DistortionCoordinatescreate(long address)Returns a newDistortionCoordinatesinstance for the specified memory address.static DistortionCoordinates.Buffercreate(long address, int capacity)Create aDistortionCoordinates.Bufferinstance at the specified memory.static DistortionCoordinatescreateSafe(long address)static DistortionCoordinates.BuffercreateSafe(long address, int capacity)static DistortionCoordinatesmalloc()Returns a newDistortionCoordinatesinstance allocated withmemAlloc.static DistortionCoordinates.Buffermalloc(int capacity)Returns a newDistortionCoordinates.Bufferinstance allocated withmemAlloc.static DistortionCoordinatesmallocStack()Returns a newDistortionCoordinatesinstance allocated on the thread-localMemoryStack.static DistortionCoordinates.BuffermallocStack(int capacity)Returns a newDistortionCoordinates.Bufferinstance allocated on the thread-localMemoryStack.static DistortionCoordinates.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newDistortionCoordinates.Bufferinstance allocated on the specifiedMemoryStack.static DistortionCoordinatesmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newDistortionCoordinatesinstance allocated on the specifiedMemoryStack.static java.nio.FloatBuffernrfBlue(long struct)Unsafe version ofrfBlue().static floatnrfBlue(long struct, int index)Unsafe version ofrfBlue.static java.nio.FloatBuffernrfGreen(long struct)Unsafe version ofrfGreen().static floatnrfGreen(long struct, int index)Unsafe version ofrfGreen.static java.nio.FloatBuffernrfRed(long struct)Unsafe version ofrfRed().static floatnrfRed(long struct, int index)Unsafe version ofrfRed.java.nio.FloatBufferrfBlue()Returns aFloatBufferview of therfBluefield.floatrfBlue(int index)Returns the value at the specified index of therfBluefield.java.nio.FloatBufferrfGreen()Returns aFloatBufferview of therfGreenfield.floatrfGreen(int index)Returns the value at the specified index of therfGreenfield.java.nio.FloatBufferrfRed()Returns aFloatBufferview of therfRedfield.floatrfRed(int index)Returns the value at the specified index of therfRedfield.intsizeof()
-
-
-
Constructor Detail
-
DistortionCoordinates
public DistortionCoordinates(java.nio.ByteBuffer container)
Creates aDistortionCoordinatesinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
rfRed
public java.nio.FloatBuffer rfRed()
Returns aFloatBufferview of therfRedfield.
-
rfRed
public float rfRed(int index)
Returns the value at the specified index of therfRedfield.
-
rfGreen
public java.nio.FloatBuffer rfGreen()
Returns aFloatBufferview of therfGreenfield.
-
rfGreen
public float rfGreen(int index)
Returns the value at the specified index of therfGreenfield.
-
rfBlue
public java.nio.FloatBuffer rfBlue()
Returns aFloatBufferview of therfBluefield.
-
rfBlue
public float rfBlue(int index)
Returns the value at the specified index of therfBluefield.
-
malloc
public static DistortionCoordinates malloc()
Returns a newDistortionCoordinatesinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static DistortionCoordinates calloc()
Returns a newDistortionCoordinatesinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static DistortionCoordinates create()
Returns a newDistortionCoordinatesinstance allocated withBufferUtils.
-
create
public static DistortionCoordinates create(long address)
Returns a newDistortionCoordinatesinstance for the specified memory address.
-
createSafe
@Nullable public static DistortionCoordinates createSafe(long address)
-
malloc
public static DistortionCoordinates.Buffer malloc(int capacity)
Returns a newDistortionCoordinates.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static DistortionCoordinates.Buffer calloc(int capacity)
Returns a newDistortionCoordinates.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static DistortionCoordinates.Buffer create(int capacity)
Returns a newDistortionCoordinates.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static DistortionCoordinates.Buffer create(long address, int capacity)
Create aDistortionCoordinates.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static DistortionCoordinates.Buffer createSafe(long address, int capacity)
-
mallocStack
public static DistortionCoordinates mallocStack()
Returns a newDistortionCoordinatesinstance allocated on the thread-localMemoryStack.
-
callocStack
public static DistortionCoordinates callocStack()
Returns a newDistortionCoordinatesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static DistortionCoordinates mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinatesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static DistortionCoordinates callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinatesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static DistortionCoordinates.Buffer mallocStack(int capacity)
Returns a newDistortionCoordinates.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static DistortionCoordinates.Buffer callocStack(int capacity)
Returns a newDistortionCoordinates.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static DistortionCoordinates.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static DistortionCoordinates.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nrfRed
public static java.nio.FloatBuffer nrfRed(long struct)
Unsafe version ofrfRed().
-
nrfRed
public static float nrfRed(long struct, int index)Unsafe version ofrfRed.
-
nrfGreen
public static java.nio.FloatBuffer nrfGreen(long struct)
Unsafe version ofrfGreen().
-
nrfGreen
public static float nrfGreen(long struct, int index)Unsafe version ofrfGreen.
-
nrfBlue
public static java.nio.FloatBuffer nrfBlue(long struct)
Unsafe version ofrfBlue().
-
nrfBlue
public static float nrfBlue(long struct, int index)Unsafe version ofrfBlue.
-
-