The values might be either in tangent or radians.
| Modifier and Type | Field and Description |
|---|---|
| public final float | bottom
Half vertical FOV from center to bottom, either in |
| public final boolean | inTangents
If true, values are in tangent, otherwise radians. |
| public final float | left
Half horizontal FOV from center to left, either in |
| public final float | right
Half horizontal FOV from center to right, either in |
| public final float | top
Half vertical FOV from center to top, either in |
| Access | Constructor and Description |
|---|---|
| public | FovHVHalves(final float
half horizontal FOV, left side, in tangent or radians left, final float half horizontal FOV, right side, in tangent or radians right, final float half vertical FOV, top side, in tangent or radians top, final float half vertical FOV, bottom side, in tangent or radians bottom, final boolean if true, values are in tangent, otherwise radians inTangents)Constructor for one |
| Modifier and Type | Method and Description |
|---|---|
| public static FovHVHalves | byFovyRadianAndAspect(final float
vertical FOV in radians verticalFov, final float aspect ration width / height aspect)Returns a symmetrical centered
top = bottom = tan( verticalFov / 2f );
left = right = aspect * top;
|
| public static FovHVHalves | byFovyRadianAndAspect(final float
whole vertical FOV in radians verticalFov, final float vertical center from top in [0..1] vertCenterFromTop, final float aspect ration width / height aspect, final float horizontal center from left in [0..1] horizCenterFromLeft)Returns a custom symmetry
halfVertFovTan = tan( verticalFov / 2f );
halfHorizFovTan = aspect * halfVertFovTan;
horizontalFov = atan( halfHorizFovTan ) * 2f;
return
|
| public static FovHVHalves | byRadians(final float
whole horizontal FOV in radians horizontalFov, final float whole vertical FOV in radians verticalFov)Returns a symmetrical centered
halfHorizFovTan = tan( horizontalFov / 2f );
halfVertFovTan = tan( verticalFov / 2f );
|
| public static FovHVHalves | byRadians(final float
whole horizontal FOV in radians horizontalFov, final float horizontal center from left in [0..1] horizCenterFromLeft, final float whole vertical FOV in radians verticalFov, final float vertical center from top in [0..1] vertCenterFromTop)Returns a custom symmetry
left = tan( horizontalFov * horizCenterFromLeft )
right = tan( horizontalFov * ( 1f - horizCenterFromLeft ) )
top = tan( verticalFov * vertCenterFromTop )
bottom = tan( verticalFov * (1f - vertCenterFromTop ) )
|
| public final float | |
| public final String | |
| public final String | |
| public final FovHVHalves | |
| public final float |
| bottom | back to summary |
|---|---|
| public final float bottom Half vertical FOV from center to bottom, either in | |
| inTangents | back to summary |
|---|---|
| public final boolean inTangents If true, values are in tangent, otherwise radians. | |
| left | back to summary |
|---|---|
| public final float left Half horizontal FOV from center to left, either in | |
| right | back to summary |
|---|---|
| public final float right Half horizontal FOV from center to right, either in | |
| top | back to summary |
|---|---|
| public final float top Half vertical FOV from center to top, either in | |
| FovHVHalves | back to summary |
|---|---|
| public FovHVHalves(final float left, final float right, final float top, final float bottom, final boolean inTangents) Constructor for one 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.
| |
| byFovyRadianAndAspect | back to summary |
|---|---|
| public static FovHVHalves byFovyRadianAndAspect(final float verticalFov, final float aspect) Returns a symmetrical centered
top = bottom = tan( verticalFov / 2f );
left = right = aspect * top;
| |
| byFovyRadianAndAspect | back to summary |
|---|---|
| public static FovHVHalves byFovyRadianAndAspect(final float verticalFov, final float vertCenterFromTop, final float aspect, final float horizCenterFromLeft) Returns a custom symmetry
halfVertFovTan = tan( verticalFov / 2f );
halfHorizFovTan = aspect * halfVertFovTan;
horizontalFov = atan( halfHorizFovTan ) * 2f;
return
| |
| byRadians | back to summary |
|---|---|
| public static FovHVHalves byRadians(final float horizontalFov, final float verticalFov) Returns a symmetrical centered
halfHorizFovTan = tan( horizontalFov / 2f );
halfVertFovTan = tan( verticalFov / 2f );
| |
| byRadians | back to summary |
|---|---|
| public static FovHVHalves byRadians(final float horizontalFov, final float horizCenterFromLeft, final float verticalFov, final float vertCenterFromTop) Returns a custom symmetry
left = tan( horizontalFov * horizCenterFromLeft )
right = tan( horizontalFov * ( 1f - horizCenterFromLeft ) )
top = tan( verticalFov * vertCenterFromTop )
bottom = tan( verticalFov * (1f - vertCenterFromTop ) )
| |
| horzFov | back to summary |
|---|---|
| public final float horzFov() Returns the full horizontal FOV, i.e. | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| toStringInDegrees | back to summary |
|---|---|
| public final String toStringInDegrees() | |
| toTangents | back to summary |
|---|---|
| public final FovHVHalves toTangents() Returns this instance in tangent values.
If this instance is | |
| vertFov | back to summary |
|---|---|
| public final float vertFov() Returns the full vertical FOV, i.e. | |