| PerspectiveViewVolumeGetWidthAndHeight Method |
Converts a field of view of a symmetric frustum to width and height.
Namespace: DigitalRune.Geometry.ShapesAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static void GetWidthAndHeight(
float fieldOfViewY,
float aspectRatio,
float distance,
out float width,
out float height
)
Public Shared Sub GetWidthAndHeight (
fieldOfViewY As Single,
aspectRatio As Single,
distance As Single,
<OutAttribute> ByRef width As Single,
<OutAttribute> ByRef height As Single
)
public:
static void GetWidthAndHeight(
float fieldOfViewY,
float aspectRatio,
float distance,
[OutAttribute] float% width,
[OutAttribute] float% height
)
static member GetWidthAndHeight :
fieldOfViewY : float32 *
aspectRatio : float32 *
distance : float32 *
width : float32 byref *
height : float32 byref -> unit
Parameters
- fieldOfViewY
- Type: SystemSingle
The vertical field of view in radians. - aspectRatio
- Type: SystemSingle
The aspect ratio (width / height). - distance
- Type: SystemSingle
The distance at which width and height are calculated.
- width
- Type: SystemSingle
The width of the view volume at the specified distance.
- height
- Type: SystemSingle
The height of the view volume at the specified distance.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | fieldOfViewY is not between 0 and π radians (0° and 180°),
aspectRatio is negative or 0, or distance is negative.
|
See Also