VrControllerAvatarNode class
Lightweight visual twin of a paired smartphone controller.
Position is deliberately head-relative in Lite mode; orientation comes from the remote IMU. It communicates control layout and state without claiming centimeter-accurate physical tracking.
Constructors
- VrControllerAvatarNode({required VrControllerProfile profile, required CameraRig cameraRig, double visualScale = 2.0, Vector3? anchorOffset, VrControllerArmModel? armModel})
Properties
- anchorOffset → Vector3
-
final
- armModel → VrControllerArmModel?
-
final
- body ↔ MeshNode
-
latefinal
-
no setter
- cameraRig → CameraRig
-
final
- childCount → int
-
no setterinherited
-
children
→ List<
Node> -
no setterinherited
-
controlIds
→ Iterable<
String> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRenderable → bool
-
Whether this node contributes pixels during a render pass.
no setterinherited
- isTransparent → bool
-
Whether this node requires back-to-front alpha ordering.
no setterinherited
- localAabb → Aabb
-
Override to provide local-space bounding box.
no setterinherited
- localMatrix → Matrix4
-
Local transform matrix.
no setterinherited
- name ↔ String
-
getter/setter pairinherited
- ownWorldAabb → Aabb
-
Computes the AABB of this node's own geometry in world space
(without descendants). Used for self-hits in raycasting and physics.
no setterinherited
- parent → Node?
-
no setterinherited
- pointable ↔ Pointable?
-
getter/setter pairinherited
- profile → VrControllerProfile
-
final
- rangeConfidence ↔ double?
-
getter/setter pair
- rangeMeters ↔ double?
-
getter/setter pair
- rangeSource ↔ VrRangeSource?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screen ↔ MeshNode
-
latefinal
- transform → Transform3D
-
finalinherited
- visible ↔ bool
-
getter/setter pairinherited
- visualScale → double
-
final
- worldAabb → Aabb
-
Computes the AABB of this node AND all its descendants in world space.
Group nodes have no geometry, so their own box would be a phantom ±0.5m
cube at their position — using it for culling wrongly discarded entire
subtrees. The union is cached and invalidated on any transform or
hierarchy change in the subtree.
no setterinherited
- worldMatrix → Matrix4
-
World transform matrix (accumulated from root).
no setterinherited
- worldPosition → Vector3
-
World position extracted from world matrix.
no setterinherited
Methods
-
addChild(
Node child) → void -
inherited
-
collectVisible(
) → List< Node> -
Collects all visible nodes in the tree.
inherited
-
controlNode(
String id) → Node? -
findChild(
String name) → Node? -
Finds a child by name recursively.
inherited
-
isControlActive(
String id) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRender(
Canvas canvas, Matrix4 viewProjection) → void -
Override for custom rendering.
inherited
-
onTransformChanged(
) → void -
Called when any transform property changes.
inherited
-
onUpdate(
double dt) → void -
Override for custom per-frame logic.
override
-
removeChild(
Node child) → void -
inherited
-
removeFromParent(
) → void -
inherited
-
render(
Canvas canvas, Matrix4 viewProjection) → void -
Renders this node and children to the canvas.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
traverse(
void visitor(Node child)) → void -
Traverses the tree depth-first, calling visitor for each node.
inherited
-
update(
double dt) → void -
Called once per frame before rendering.
inherited
-
updateButtons(
int bitset) → void - Bit N maps to control N in VrControllerProfile.controls.
-
updateOrientation(
Quaternion orientation) → void - Applies the calibrated remote rotation without replacing quaternion storage.
-
updateRange(
{double? meters, VrRangeSource? source, double? confidence}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- activeControlColor → const Color
- idleControlColor → const Color