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.NativeResource
Used 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 class
DistortionCoordinates.Buffer
An array ofDistortionCoordinates
structs.
-
Constructor Summary
Constructors Constructor Description DistortionCoordinates(java.nio.ByteBuffer container)
Creates aDistortionCoordinates
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DistortionCoordinates
calloc()
Returns a newDistortionCoordinates
instance allocated withmemCalloc
.static DistortionCoordinates.Buffer
calloc(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withmemCalloc
.static DistortionCoordinates
callocStack()
Returns a newDistortionCoordinates
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DistortionCoordinates.Buffer
callocStack(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DistortionCoordinates.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DistortionCoordinates
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DistortionCoordinates
create()
Returns a newDistortionCoordinates
instance allocated withBufferUtils
.static DistortionCoordinates.Buffer
create(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withBufferUtils
.static DistortionCoordinates
create(long address)
Returns a newDistortionCoordinates
instance for the specified memory address.static DistortionCoordinates.Buffer
create(long address, int capacity)
Create aDistortionCoordinates.Buffer
instance at the specified memory.static DistortionCoordinates
createSafe(long address)
static DistortionCoordinates.Buffer
createSafe(long address, int capacity)
static DistortionCoordinates
malloc()
Returns a newDistortionCoordinates
instance allocated withmemAlloc
.static DistortionCoordinates.Buffer
malloc(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withmemAlloc
.static DistortionCoordinates
mallocStack()
Returns a newDistortionCoordinates
instance allocated on the thread-localMemoryStack
.static DistortionCoordinates.Buffer
mallocStack(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated on the thread-localMemoryStack
.static DistortionCoordinates.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates.Buffer
instance allocated on the specifiedMemoryStack
.static DistortionCoordinates
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates
instance allocated on the specifiedMemoryStack
.static java.nio.FloatBuffer
nrfBlue(long struct)
Unsafe version ofrfBlue()
.static float
nrfBlue(long struct, int index)
Unsafe version ofrfBlue
.static java.nio.FloatBuffer
nrfGreen(long struct)
Unsafe version ofrfGreen()
.static float
nrfGreen(long struct, int index)
Unsafe version ofrfGreen
.static java.nio.FloatBuffer
nrfRed(long struct)
Unsafe version ofrfRed()
.static float
nrfRed(long struct, int index)
Unsafe version ofrfRed
.java.nio.FloatBuffer
rfBlue()
Returns aFloatBuffer
view of therfBlue
field.float
rfBlue(int index)
Returns the value at the specified index of therfBlue
field.java.nio.FloatBuffer
rfGreen()
Returns aFloatBuffer
view of therfGreen
field.float
rfGreen(int index)
Returns the value at the specified index of therfGreen
field.java.nio.FloatBuffer
rfRed()
Returns aFloatBuffer
view of therfRed
field.float
rfRed(int index)
Returns the value at the specified index of therfRed
field.int
sizeof()
-
-
-
Constructor Detail
-
DistortionCoordinates
public DistortionCoordinates(java.nio.ByteBuffer container)
Creates aDistortionCoordinates
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
rfRed
public java.nio.FloatBuffer rfRed()
Returns aFloatBuffer
view of therfRed
field.
-
rfRed
public float rfRed(int index)
Returns the value at the specified index of therfRed
field.
-
rfGreen
public java.nio.FloatBuffer rfGreen()
Returns aFloatBuffer
view of therfGreen
field.
-
rfGreen
public float rfGreen(int index)
Returns the value at the specified index of therfGreen
field.
-
rfBlue
public java.nio.FloatBuffer rfBlue()
Returns aFloatBuffer
view of therfBlue
field.
-
rfBlue
public float rfBlue(int index)
Returns the value at the specified index of therfBlue
field.
-
malloc
public static DistortionCoordinates malloc()
Returns a newDistortionCoordinates
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static DistortionCoordinates calloc()
Returns a newDistortionCoordinates
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static DistortionCoordinates create()
Returns a newDistortionCoordinates
instance allocated withBufferUtils
.
-
create
public static DistortionCoordinates create(long address)
Returns a newDistortionCoordinates
instance for the specified memory address.
-
createSafe
@Nullable public static DistortionCoordinates createSafe(long address)
-
malloc
public static DistortionCoordinates.Buffer malloc(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static DistortionCoordinates.Buffer calloc(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static DistortionCoordinates.Buffer create(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static DistortionCoordinates.Buffer create(long address, int capacity)
Create aDistortionCoordinates.Buffer
instance 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 newDistortionCoordinates
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static DistortionCoordinates callocStack()
Returns a newDistortionCoordinates
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static DistortionCoordinates mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static DistortionCoordinates callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDistortionCoordinates
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static DistortionCoordinates.Buffer callocStack(int capacity)
Returns a newDistortionCoordinates.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-