Matrix |
public class MatrixCamera : ICamera
The MatrixCamera type exposes the following members.
Name | Description | |
---|---|---|
MatrixCamera(String) | Constructor | |
MatrixCamera(Matrix4x4, Matrix4x4) | Constructor |
Name | Description | |
---|---|---|
AspectRatio | Gets or sets the camera's aspect ration - calculated as viewport's width / height. | |
FarPlaneDistance | Gets or sets a value that specifies the distance from the camera of the camera's far clip plane. | |
Name | Gets the name of the camera | |
NearPlaneDistance | Gets or sets a value that specifies the distance from the camera of the camera's near clip plane. | |
Projection | Gets or sets the camera's projection matrix. | |
ProjectionType | Gets type of projection (Perspective or Orthographic) | |
SceneView | Gets or sets the SceneView that this camera belong to. | |
Version | Gets the version number of this Camera. Version is increased each time the camera is changed. This can be used to check if the camera was changed between two points in time. Note: When camera is changed a lot of times, the Version value can overflow from positive to negative numbers (to prevent problems do not check for bigger value but for not equal value) | |
View | Gets or sets the camera's view matrix. |
Name | Description | |
---|---|---|
GetCameraMatrices | GetCameraMatrices method gets the camera's view and projection matrices. | |
GetCameraPlaneOrientation | GetCameraPlaneOrientation gets plane's normal, width and height vectors that can be used to orient the plane 3D model so that it is aligned with the camera view. | |
GetCameraPosition | Gets the camera's position. The position is calculating with inverting the view matrix and extracting the values from 4th row. The invert operation can be skipped with calling SetCameraPosition(Vector3) method. | |
GetLookDirection | Returns the normalized look direction of the camera. | |
GetUpDirection | Returns the normalized up direction of the camera. | |
GetViewProjectionMatrix | Gets a precalculated View * Projection matrix. | |
OnCameraChanged | OnCameraChanged is called when the camera is changed and triggers the CameraChanged event. | |
RotateCamera | Rotates the camera for the specified heading and attitude. | |
SerializeToJson | SerializeToJson serializes the specified camera into a json string. The returned string starts with assembly qualified camera type name. The serialized json can be converted to a camera by calling static DeserializeJson(String) method. | |
SetCameraPosition | Sets camera's position. If camera's position is set by calling this method, then this prevents calling invert on view matrix when the GetCameraPosition is called. This method should be called after setting View matrix. | |
Update | Update method updates the camera matrices when needed (when there were any change in the camera properties) or when forceMatrixUpdate is set to true. | |
UpdateAnimations | UpdateAnimations method updates the camera's rotation when it is animated. |
Name | Description | |
---|---|---|
CameraChanged | CameraChanged event occurs after the camera was changed. |