CameraData
in package
The camera data object is meant to hold all meta data about the current frame This includes: - projection & view matrix and their combination as well as the inverse - frame delta time - screen resolution, effective resolution and content scale - frustum of the current frame - viewport information - The current camera object used
Table of Contents
Properties
- $compensation : float
- Compensation / alpha value for the current frame
- $contentScaleX : float
- Content scale factor (X)
- $contentScaleY : float
- Content scale factor (Y)
- $frameCamera : Camera
- The interpolarated camera of the scene this camera is used for things like frustum culling or LOD levels
- $frustum : Frustum
- Frustum of the current frame
- $inverseProjectionView : Mat4
- Inverse projection view matrix
- $projection : Mat4
- Current projection matrix
- $projectionView : Mat4
- Projection view matrix
- $renderCamera : Camera
- The camera used to actually render the scene espacially usefull for debugging allowing to view the scene from an outside perspective. This can be used to debug LOD or culling.
- $resolutionX : int
- Current rendering resolution (X / width)
- $resolutionY : int
- Current rendering resolution (Y / height)
- $view : Mat4
- Current view matrix
- $viewport : Viewport|null
- Viewport instance for orthographic projections
Methods
- __construct() : mixed
- Constructor
- getDeviceResolutionVec() : Vec2
- Returns the resolution in real pixels (not scaled)
- getResolutionVec() : Vec2
- Returns the resolution in scaled pixels
Properties
$compensation read-only
Compensation / alpha value for the current frame
public
float
$compensation
$contentScaleX read-only
Content scale factor (X)
public
float
$contentScaleX
$contentScaleY read-only
Content scale factor (Y)
public
float
$contentScaleY
$frameCamera read-only
The interpolarated camera of the scene this camera is used for things like frustum culling or LOD levels
public
Camera
$frameCamera
$frustum read-only
Frustum of the current frame
public
Frustum
$frustum
$inverseProjectionView read-only
Inverse projection view matrix
public
Mat4
$inverseProjectionView
$projection read-only
Current projection matrix
public
Mat4
$projection
$projectionView read-only
Projection view matrix
public
Mat4
$projectionView
$renderCamera read-only
The camera used to actually render the scene espacially usefull for debugging allowing to view the scene from an outside perspective. This can be used to debug LOD or culling.
public
Camera
$renderCamera
$resolutionX read-only
Current rendering resolution (X / width)
public
int
$resolutionX
$resolutionY read-only
Current rendering resolution (Y / height)
public
int
$resolutionY
$view read-only
Current view matrix
public
Mat4
$view
$viewport read-only
Viewport instance for orthographic projections
public
Viewport|null
$viewport
Methods
__construct()
Constructor
public
__construct(Camera $frameCamera, Camera $renderCamera, Mat4 $projection, Mat4 $view, Mat4 $projectionView, Mat4 $inverseProjectionView, Frustum $frustum, float $compensation, int $resolutionX, int $resolutionY, float $contentScaleX, float $contentScaleY[, Viewport|null $viewport = null ]) : mixed
Parameters
getDeviceResolutionVec()
Returns the resolution in real pixels (not scaled)
public
getDeviceResolutionVec() : Vec2
Return values
Vec2getResolutionVec()
Returns the resolution in scaled pixels
public
getResolutionVec() : Vec2