OrthographicCamera class Scene graph

A camera with a parallel OrthographicProjection, placed by eye/target/up like PerspectiveCamera.

Because an orthographic view has no perspective, moving the eye along the view direction does not change the image size; use OrthographicProjection.zoom or OrthographicProjection.size to frame. The eye still sets where the volume starts, since OrthographicProjection clip distances are measured from it.

Inheritance

Constructors

OrthographicCamera({OrthographicProjection? projection, Vector3? position, Vector3? target, Vector3? up})
Creates an OrthographicCamera. Defaults match PerspectiveCamera (eye at (0, 0, -5) looking at the origin, +Y up) with a default OrthographicProjection.
OrthographicCamera.framing(Aabb3 bounds, {Vector3? direction, Vector3? up, double margin = 1.1})
Places a camera to frame bounds (a model's world-space AABB, from Node.combinedWorldBounds) so it fills the view on any aspect ratio.
factory

Properties

forward → Vector3
The world-space direction the camera looks along (unit length).
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
position ↔ Vector3
World-space position of the eye, the origin the clip distances are measured from.
getter/setter pairoverride-getter
projection ↔ OrthographicProjection
The lens. Mutate its fields, or assign a new one, to reframe.
getter/setter pairoverride-getter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target ↔ Vector3
World-space point the camera is looking at.
getter/setter pair
up ↔ Vector3
World-space "up" direction used to orient the camera around the view vector.
getter/setter pairoverride-getter

Methods

getFrustum(Size dimensions) → Frustum
Returns the view frustum (six normalized clip planes) for a render target of the given dimensions.
inherited
getViewMatrix() → Matrix4
Returns the world-to-view transform (the view matrix), independent of the render target size.
override
getViewTransform(Size dimensions, {Vector2? jitter}) → Matrix4
Returns the combined projection-and-view transform for a view of the given dimensions, in logical pixels (see CameraProjection.getProjectionMatrixForViewport).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
projectToScreenUv(Vector3 worldPoint, Size viewport) → Vector2?
Maps a world-space point to screen UV (origin top-left, 0..1 across viewport). The projection worldToScreen scales to pixels, so the two cannot disagree. Returns null when worldPoint is at or behind the camera plane. Values outside 0..1 are a point off screen; callers decide whether to clamp or cull.
inherited
screenPointToRay(Offset screenPosition, Size viewSize) → Ray
Maps a position inside a view (logical pixels, origin top-left) to the world-space ray leaving the camera through that point, for picking (Scene.raycast) and pointer input. viewSize is the view's logical size (the constraints SceneView renders into).
inherited
toString() → String
A string representation of this object.
inherited
worldToScreen(Vector3 worldPoint, Size viewSize) → Offset?
Maps a world-space point to its position inside a view (logical pixels, origin top-left), the forward counterpart of screenPointToRay.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited