Base interface for classes that represent a camera-based viewport on the screen.
interface
|
ICameraViewport
|
base of
|
ICameraViewportDepth
|
The Camera object.
property
|
Camera
{
get
}
|
||
type
|
Camera
|
||
value
|
|
The Camera object. |
Returns the screen coordinates that represent the camera direction.
property
|
Center
{
get
}
|
||
type
|
Vec2F
|
||
value
|
The screen coordinates that represent the camera direction. |
Remarks:
Usually, this is the center of the screen, but might be a different location, for example to compensate for GUI overlays.
Returns the viewport height, in screen pixels.
property
|
Height
{
get
}
|
||
type
|
int32
|
||
value
|
|
The viewport height. |
Remarks:
Defaults
to
768
.
Returns the viewport width, in screen pixels.
property
|
Width
{
get
}
|
||
type
|
int32
|
||
value
|
|
The viewport width. |
Remarks:
Defaults
to
1024
.
Computes a viewport ray for the given screen coordinates.
[Pure]
|
||||
method
|
ScreenToWorld
(float32 pixelX,
float32 pixelY,
out Vec3D origin,
out Vec3D direction)
|
|||
params
|
pixelX
|
The screen X-coordinate (see PerspectiveRay). | ||
pixelY
|
The screen Y-coordinate (see PerspectiveRay). | |||
origin
|
Output of viewport ray origin, in world-space. | |||
direction
|
Output of unit-length viewport ray direction, in world-space. |
Projects the given point onto the viewport plane.
[Pure]
|
||||
method
|
WorldToScreen
(float64 x,
float64 y,
float64 z)
|
|||
type
|
Vec2F
|
|||
params
|
x
|
The point X-coordinate, in world-space. | ||
y
|
The point Y-coordinate, in world-space. | |||
z
|
The point Z-coordinate, in world-space. | |||
returns
|
The screen coordinates or Undefined if the given point is undefined or behind the viewport plane. |
Computes a viewport ray for the given screen coordinates.
[Pure]
|
||||
method
|
ScreenToWorld
(Vec2F pixel,
out Vec3D origin,
out Vec3D direction)
|
|||
params
|
pixel
|
The screen coordinates (see PerspectiveRay). | ||
origin
|
Output of viewport ray origin. | |||
direction
|
Output of unit-length viewport ray direction. |
Projects the given point onto the viewport plane.
[Pure]
|
||||
method
|
WorldToScreen
(Vec3D point)
|
|||
type
|
Vec2F
|
|||
params
|
point
|
The point, in world-space. | ||
returns
|
The screen coordinates or Undefined if the given point is undefined or behind the viewport plane. |