NodeCamera class Scene graph
A Camera whose view comes from a node's world transform: the +Z
axis is the look direction, +Y is up, and the translation is the eye.
This is the inverse of the eye/target/up convention PerspectiveCamera
builds, so a node placed at inverse(camera.getViewMatrix()) yields
the same view.
The transform is read at render time, so the camera tracks the node live. Usually obtained from CameraComponent.toCamera.
Constructors
- NodeCamera(Node node, CameraProjection projection)
-
Creates a camera that tracks
nodewith the givenprojection.
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
- node → Node
-
The node whose world transform drives the view.
final
- position → Vector3
-
The world-space position of the camera (the eye point). Used by
materials for view-dependent shading (e.g. specular reflections).
no setteroverride
- projection → CameraProjection
-
The lens projection paired with this camera's view.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- up → Vector3
-
The world-space up direction used to orient the camera around
forward.
no setteroverride
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) → Matrix4 -
Returns the combined projection-and-view transform for a render target
of the given
dimensions.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
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.viewSizeis the view's logical size (the constraintsSceneViewrenders into).inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited