Constructor setting up the camera's eye, center and up vectors.
The viewpoint of the virtual camera
The look-at point in the scene
The up-vector of the virtual camera
Whether or not any other public property has changed. Please note that the alteration status is detached from caching state of lazily computed properties.
Intended for resetting alteration status.
Computes the ratio of width over height (set explicitly for differentiation between viewport size and scale).
Sets the aspect ratio (width over height). However, this is not derived from viewport to allow for differentiation between viewport size and scale.
Look-at point into a virtual 3D scene.
Sets the center. Invalidates the view.
Position of the virtual camera in a virtual 3D scene, the point of view.
Sets the eye. Invalidates the view.
Distance of far-plane in view coordinates.
Sets the distance to the far clipping plane. Invalidates the projection.
Sets the horizontal field-of-view in degrees. Invalidates the projection. Note that internally, this will be translated to the corresponding the vertical field.
Vertical field of view in degree.
Sets the vertical field-of-view in degrees. Invalidates the projection.
Access to the viewport height.
Distance of near-plane in view coordinates.
Sets the distance to the near clipping plane. Invalidates the projection.
Returns the matrix which contains the operations that are applied to the viewProjection matrix. For now this is only used by the TiledRenderer to adjust the NDC-coordinates to the tile.
Sets the matrix which contains the operations that are applied to the viewProjection matrix. For now this is only used by the TiledRenderer to adjust the NDC-coordinates to the tile.
Either returns the cached projection matrix or derives the current one after invalidation and caches it.
Either returns the cached inverse projection matrix or derives the current one after invalidation and caches it.
Up-vector of the virtual camera.
Sets the up vector. Invalidates the view.
Either returns the cached view matrix or derives the current one after invalidation and caches it.
Either returns the inverse cached view matrix or derives the current one after invalidation and caches it.
Returns the view projection matrix based on view and projection. This is also cached (since matrix multiplication is involved).
Returns the inverse view projection matrix based on view and projection. This is also cached (since matrix multiplication is involved).
Access to the viewport width.
With this function the view of a physical camera can be emulated. The width and focal length of a lens are used to generate the correct field of view. Blender camera presets can be imported by using the camera setting 'HorizontalFit' and using the width and focal length values in this function. See: https://www.scantips.com/lights/fieldofviewmath.html
Width of the sensor in mm
Focal length of the lens in mm
Invalidates derived matrices, i.e., view, projection, and view-projection. The view should be invalidated on eye, center, and up changes. The projection should be invalidated on fovy, viewport, near, and far changes. The view projection invalidates whenever either one or both view and projection are to be invalidated.
Computes a vertical field of view angle based on the display height and distance to eye. Since both parameters are highly dependent of the device, this function can only be used to derive a rough estimate for a reasonable field of view. Note that both parameters should be passed using the same unit, e.g., inch or centimeters.
Height of an element on the display.
Distance from the users eye to that element.
Virtual 3D camera specified by eye, center, up, fovy, near, far, and a viewport size. It provides access to cached view, projection, and view projection matrices. Cached by means of whenever one of the attributes change, all matrices are invalidated and recalculated only once and only when requested. Please note that eye denotes the position in a virtual 3D scene and center denotes the position which is being looked at.