DVSceneView class final

A perspective camera, with the orbit it is controlled by.

Screen coordinates are logical pixels with the origin at the top left and y growing downward, the way Flutter lays out, so a tap's local position goes straight into rayAt.

Constructors

DVSceneView({required DVVec3 eye, required DVVec3 target, DVVec3 up = DVVec3.up, double fovYDegrees = 45, double near = 0.1, double far = 1000})
DVSceneView.fromCamera(DVSceneCameraData camera, {DVMat4? world})
The view a document camera describes: its orbit when it has one, otherwise looking down the node's -Z from wherever world puts it.
factory
DVSceneView.orbit({DVVec3 target = DVVec3.zero, required double distance, double yaw = 0, double pitch = 0, double fovYDegrees = 45, double near = 0.1, double far = 1000})
A camera distance from target, turned yaw radians about the up axis and raised pitch radians above the horizon. Yaw 0 and pitch 0 look down -Z.
factory

Properties

distance → double
final
eye → DVVec3
final
far → double
final
fovYDegrees → double
final
hashCode → int
The hash code for this object.
no setterinherited
near → double
final
pitch → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → DVVec3
final
up → DVVec3
final
view → DVMat4
no setter
yaw → double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orbitBy({double yaw = 0, double pitch = 0, double zoom = 1}) → DVSceneView
This orbit turned by yaw and pitch radians and moved zoom times closer, clamped so it never passes the pole or its near plane.
project(DVVec3 point, double width, double height) → DVVec3?
Where point is drawn in a width x height viewport, as (x, y, depth in -1..1), or null when it is behind the camera -- projecting such a point anyway mirrors it onto the screen.
projection(double aspect) → DVMat4
rayAt(double x, double y, double width, double height) → DVRay
The ray from the eye through pixel (x, y) of a width x height viewport.
toString() → String
A string representation of this object.
override

Operators

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

Constants

maxPitch → const double
How close to straight up or down an orbit may turn. Short of the pole, because at it the up vector and the view direction coincide and the view has no defined right.