Top Description Fields Constructors Methods
jogamp.opengl.util.stereo

public final Class ScaleAndOffset2D

extends Object
Class Inheritance
Imports
com.jogamp.nativewindow.util.DimensionImmutable, .RectangleImmutable, com.jogamp.opengl.math.FovHVHalves, .VectorUtil

2D scale and offset NDC class, providing conversion from FovHVHalves in tangent to NDC space.

See OpenGL.org: Compute eye space from window space

Field Summary

Modifier and TypeField and Description
pack-priv final float[]
offset

Offset for x- and y-component.

pack-priv final float[]
scale

Scale for x- and y-component.

private static final float[]

Constructor Summary

AccessConstructor and Description
public
ScaleAndOffset2D(final float[] scale, final float[] offset)

public
ScaleAndOffset2D(final FovHVHalves fovHVHalves)

Create the Normalized Device Coordinate Space (NDC) [-1,+1] instance from the given fovHVHalves.

public
ScaleAndOffset2D(final FovHVHalves fovHVHalves, final DimensionImmutable rendertargetSize, final RectangleImmutable renderViewport)

Create the Normalized Device Coordinate Space (NDC) [-1,+1] instance from the given fovHVHalves, for the subsection of the render-viewport within the rendertarget-size.

Method Summary

Modifier and TypeMethod and Description
public final float[]
convertToTanFovSpace(final float[] rendertargetNDC)

Return the tangent FOV space of this eye to source NDC instance.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

offsetback to summary
pack-priv final float[] offset

Offset for x- and y-component.

scaleback to summary
pack-priv final float[] scale

Scale for x- and y-component.

vec2Halfback to summary
private static final float[] vec2Half

Constructor Detail

ScaleAndOffset2Dback to summary
public ScaleAndOffset2D(final float[] scale, final float[] offset)
ScaleAndOffset2Dback to summary
public ScaleAndOffset2D(final FovHVHalves fovHVHalves)

Create the Normalized Device Coordinate Space (NDC) [-1,+1] instance from the given fovHVHalves.

ScaleAndOffset2Dback to summary
public ScaleAndOffset2D(final FovHVHalves fovHVHalves, final DimensionImmutable rendertargetSize, final RectangleImmutable renderViewport)

Create the Normalized Device Coordinate Space (NDC) [-1,+1] instance from the given fovHVHalves, for the subsection of the render-viewport within the rendertarget-size.

Method Detail

convertToTanFovSpaceback to summary
public final float[] convertToTanFovSpace(final float[] rendertargetNDC)

Return the tangent FOV space of this eye to source NDC instance.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object