PerspectiveCamera class

A standard pinhole-style perspective camera.

Defined by an eye position, a look-at target, an up direction, a vertical field-of-view (fovRadiansY), and a near/far frustum (fovNear/fovFar). The horizontal field of view is derived from the render target's aspect ratio at draw time.

Default placement is at (0, 0, -5) looking at the origin with +Y up, suitable for inspecting a model that fits within a unit cube centered on the origin.

Inheritance

Constructors

PerspectiveCamera({double fovRadiansY = 45 * degrees2Radians, Vector3? position, Vector3? target, Vector3? up, double fovNear = 0.1, double fovFar = 1000.0})
Creates a PerspectiveCamera.

Properties

fovFar double
Distance to the far clipping plane. Geometry beyond this is clipped away. Must be greater than fovNear.
getter/setter pair
fovNear double
Distance to the near clipping plane. Geometry closer than this is clipped away.
getter/setter pair
fovRadiansY double
Vertical field of view, in radians.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
position ↔ Vector3
World-space position of the camera (the eye point).
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. Typically Vector3(0, 1, 0).
getter/setter pair

Methods

getFrustum(Size dimensions) → Frustum
Returns the view frustum (six normalized clip planes) for a render target of the given dimensions.
inherited
getViewTransform(Size dimensions) → Matrix4
Returns the combined projection-and-view transform for a render target of the given dimensions.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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