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
worldputs 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
distancefromtarget, turnedyawradians about the up axis and raisedpitchradians 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
yawandpitchradians and movedzoomtimes closer, clamped so it never passes the pole or its near plane. -
project(
DVVec3 point, double width, double height) → DVVec3? -
Where
pointis drawn in awidthxheightviewport, 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 awidthxheightviewport. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited