DVSceneGraph class final
A scene graph built from a DV3DSceneDocument.
Node order is the document's, depth first, and never changes: traversal, draw lists and pick tie-breaks all follow it, so the same document produces the same frame and the same answers on every run.
World matrices are computed on read and cached; changing a node's transform invalidates its whole subtree at once, so a hit test after a move can never read a matrix from before it.
Constructors
- DVSceneGraph(DV3DSceneDocument document)
Properties
-
anchoredIds
→ List<
String> -
Every anchored node id, in document order.
no setter
- basis → DVMat4
-
The conversion from the document's units, up axis and handedness into
world space (right-handed, Y up, metres), applied above every root.
final
- basisMirrors → bool
-
Whether basis mirrors, which flips triangle winding: a renderer must
cull the other face or the model renders inside out.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ids
→ List<
String> -
Every node id, depth first in document order.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
anchorAtOrigin(
String id) → void - Puts an anchored node at the scene origin, unanchored.
-
anchorPlacementOf(
String id) → DVSceneAnchorPlacement -
contains(
String id) → bool -
data(
String id) → DVSceneNodeData -
hideAnchor(
String id) → void - Hides an anchored node until it is placed again.
-
isVisibleInWorld(
String id) → bool - Whether this node and every ancestor are visible.
-
localBounds(
String id) → DVAabb? - The local-space bounds picking and culling use: the primitive's for a mesh, the asset's for a model once known, otherwise null.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parentOf(
String id) → String? -
pick(
DVRay ray, {bool where(String id)?}) → DVScenePick? -
The nearest visible node
rayhits, or null. -
placeAnchor(
String id, DVMat4 frame) → void -
Places an anchored node at
frame, a world-space rigid transform. -
setLocalBounds(
String id, DVAabb? bounds) → void - Records the local bounds a loaded asset reported for a model node, or clears them with null when the asset is unloaded.
-
setTransform(
String id, DVTransform transform) → void -
setVisible(
String id, bool visible) → void -
toDocument(
) → DV3DSceneDocument - The document with every node's current transform and visibility, for saving an edit made through the graph. Everything else -- ids, order, assets, keys this version does not know -- is the original's.
-
toString(
) → String -
A string representation of this object.
inherited
-
transformOf(
String id) → DVTransform -
visibleOf(
String id) → bool -
worldBounds(
String id) → DVAabb? - The world-space box around a node's own shape, or null when it has none.
-
worldMatrix(
String id) → DVMat4 -
worldPosition(
String id) → DVVec3
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
basisFor(
{required DVSceneUnits units, required DVSceneUpAxis upAxis, required DVSceneHandedness handedness}) → DVMat4 -
The conversion from
units,upAxisandhandednessinto world space.