Click or drag to resize
Ab4d.SharpEngine logo

MatrixCamera Methods

The MatrixCamera type exposes the following members.

Methods
 NameDescription
Public methodGetCameraMatrices GetCameraMatrices method gets the camera's view and projection matrices.
Public methodGetCameraPlaneOrientation 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.
Public methodGetCameraPosition 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.
Public methodGetLookDirection Returns the normalized look direction of the camera.
Public methodGetUpDirection Returns the normalized up direction of the camera.
Public methodGetViewProjectionMatrix Gets a precalculated View * Projection matrix.
Protected methodOnCameraChanged OnCameraChanged is called when the camera is changed and triggers the CameraChanged event.
Public methodRotateCamera Rotates the camera for the specified heading and attitude.
Public methodSerializeToJson 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.
Public methodSetCameraPosition 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.
Public methodUpdate Update method updates the camera matrices when needed (when there were any change in the camera properties) or when forceMatrixUpdate is set to true.
Public methodUpdateAnimations UpdateAnimations method updates the camera's rotation when it is animated.
Top
See Also