|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Horizontal and vertical field of view (FOV) halves, allowing a non-centered projection. More...
Public Member Functions | |
| FovHVHalves (final float left, final float right, final float top, final float bottom, final boolean inTangents) | |
Constructor for one FovHVHalves instance. More... | |
| final FovHVHalves | toTangents () |
| Returns this instance in tangent values. More... | |
| final float | horzFov () |
| Returns the full horizontal FOV, i.e. More... | |
| final float | vertFov () |
| Returns the full vertical FOV, i.e. More... | |
| final String | toString () |
| final String | toStringInDegrees () |
Static Public Member Functions | |
| static FovHVHalves | byRadians (final float horizontalFov, final float verticalFov) |
Returns a symmetrical centered FovHVHalves instance in inTangents, using: More... | |
| static FovHVHalves | byFovyRadianAndAspect (final float verticalFov, final float aspect) |
Returns a symmetrical centered FovHVHalves instance in inTangents, using: More... | |
| static FovHVHalves | byRadians (final float horizontalFov, final float horizCenterFromLeft, final float verticalFov, final float vertCenterFromTop) |
Returns a custom symmetry FovHVHalves instance inTangents, using: More... | |
| static FovHVHalves | byFovyRadianAndAspect (final float verticalFov, final float vertCenterFromTop, final float aspect, final float horizCenterFromLeft) |
Returns a custom symmetry FovHVHalves instance inTangents, via computing the horizontalFov using: More... | |
Public Attributes | |
| final float | left |
Half horizontal FOV from center to left, either in inTangents or radians. More... | |
| final float | right |
Half horizontal FOV from center to right, either in inTangents or radians. More... | |
| final float | top |
Half vertical FOV from center to top, either in inTangents or radians. More... | |
| final float | bottom |
Half vertical FOV from center to bottom, either in inTangents or radians. More... | |
| final boolean | inTangents |
| If true, values are in tangent, otherwise radians. More... | |
Horizontal and vertical field of view (FOV) halves, allowing a non-centered projection.
The values might be either in tangent or radians.
Definition at line 37 of file FovHVHalves.java.
| com.jogamp.math.FovHVHalves.FovHVHalves | ( | final float | left, |
| final float | right, | ||
| final float | top, | ||
| final float | bottom, | ||
| final boolean | inTangents | ||
| ) |
Constructor for one FovHVHalves instance.
It is recommended to pass and store values in tangent if used for perspective FOV calculations, since it will avoid conversion to tangent later on.
| left | half horizontal FOV, left side, in tangent or radians |
| right | half horizontal FOV, right side, in tangent or radians |
| top | half vertical FOV, top side, in tangent or radians |
| bottom | half vertical FOV, bottom side, in tangent or radians |
| inTangents | if true, values are in tangent, otherwise radians |
Definition at line 61 of file FovHVHalves.java.
|
static |
Returns a symmetrical centered FovHVHalves instance in inTangents, using:
top = bottom = tan( verticalFov / 2f ); left = right = aspect * top;
| verticalFov | vertical FOV in radians |
| aspect | aspect ration width / height |
Definition at line 94 of file FovHVHalves.java.
|
static |
Returns a custom symmetry FovHVHalves instance inTangents, via computing the horizontalFov using:
halfVertFovTan = tan( verticalFov / 2f );
halfHorizFovTan = aspect * halfVertFovTan;
horizontalFov = atan( halfHorizFovTan ) * 2f;
return byRadians(horizontalFov, horizCenterFromLeft, verticalFov, vertCenterFromTop)
| verticalFov | whole vertical FOV in radians |
| vertCenterFromTop | vertical center from top in [0..1] |
| aspect | aspect ration width / height |
| horizCenterFromLeft | horizontal center from left in [0..1] |
Definition at line 137 of file FovHVHalves.java.
|
static |
Returns a custom symmetry FovHVHalves instance inTangents, using:
left = tan( horizontalFov * horizCenterFromLeft ) right = tan( horizontalFov * ( 1f - horizCenterFromLeft ) ) top = tan( verticalFov * vertCenterFromTop ) bottom = tan( verticalFov * (1f - vertCenterFromTop ) )
| horizontalFov | whole horizontal FOV in radians |
| horizCenterFromLeft | horizontal center from left in [0..1] |
| verticalFov | whole vertical FOV in radians |
| vertCenterFromTop | vertical center from top in [0..1] |
Definition at line 114 of file FovHVHalves.java.
|
static |
Returns a symmetrical centered FovHVHalves instance in inTangents, using:
halfHorizFovTan = tan( horizontalFov / 2f ); halfVertFovTan = tan( verticalFov / 2f );
| horizontalFov | whole horizontal FOV in radians |
| verticalFov | whole vertical FOV in radians |
Definition at line 78 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.horzFov | ( | ) |
Returns the full horizontal FOV, i.e.
left + right, either in inTangents or radians.
Definition at line 161 of file FovHVHalves.java.
| final String com.jogamp.math.FovHVHalves.toString | ( | ) |
Definition at line 166 of file FovHVHalves.java.
| final String com.jogamp.math.FovHVHalves.toStringInDegrees | ( | ) |
Definition at line 169 of file FovHVHalves.java.
| final FovHVHalves com.jogamp.math.FovHVHalves.toTangents | ( | ) |
Returns this instance in tangent values.
If this instance is inTangents already, method returns this instance, otherwise a newly created instance w/ converted values to tangent.
Definition at line 152 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.vertFov | ( | ) |
Returns the full vertical FOV, i.e.
top + bottom, either in inTangents or radians.
Definition at line 164 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.bottom |
Half vertical FOV from center to bottom, either in inTangents or radians.
Definition at line 45 of file FovHVHalves.java.
| final boolean com.jogamp.math.FovHVHalves.inTangents |
If true, values are in tangent, otherwise radians.
Definition at line 47 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.left |
Half horizontal FOV from center to left, either in inTangents or radians.
Definition at line 39 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.right |
Half horizontal FOV from center to right, either in inTangents or radians.
Definition at line 41 of file FovHVHalves.java.
| final float com.jogamp.math.FovHVHalves.top |
Half vertical FOV from center to top, either in inTangents or radians.
Definition at line 43 of file FovHVHalves.java.