MeshNode class base
A node that draws a mesh.
The geometry is a MeshGeometry rather than a GpuMesh, which is what keeps
this whole layer free of the graphics backend: bounds, culling, framing and picking
need no device, and requiring one would mean none of them could be tested
without a GPU. The renderer is the place that cares whether the geometry has
actually been uploaded.
- Inheritance
- Implementers
Constructors
- MeshNode(MeshGeometry mesh, Material material, {String? name})
Properties
- castsShadow ↔ bool
-
Whether this node is drawn into the shadow maps.
getter/setter pair
-
children
→ List<
SceneNode> -
no setterinherited
-
childrenView
→ List<
SceneNode> -
Direct access for internal traversal, avoiding the unmodifiable copy.
no setterinherited
- frustumCulled ↔ bool
-
Skips frustum culling for this node.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- inverseWorldMatrix → Matrix4
-
The world-to-node transform, cached on worldVersion.
no setterinherited
- layerMask ↔ int
-
Bitmask filtered against a render view's mask, in the manner of three.js
layers. Bit 0 is the default layer.
getter/setter pairinherited
- lightmapped ↔ bool
-
Whether this mesh's vertex colour is its place in a lightmap.
getter/setter pair
- localBounds → Aabb3
-
What this node occupies in its own space, before the world transform.
no setter
- localMatrix → Matrix4
-
no setterinherited
- material ↔ Material
-
getter/setter pair
- mesh ↔ MeshGeometry
-
getter/setter pair
- morph ↔ MorphState?
-
The shapes this mesh blends towards, and how much of each.
getter/setter pair
-
morphWeights
→ List<
double> -
What each target is worth right now, from nought to one.
no setter
- name ↔ String?
-
getter/setter pairinherited
- parent → SceneNode?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scene → Scene?
-
The scene this node currently belongs to, if any.
no setterinherited
- shadowCasting ↔ ShadowCastingMode
-
How this node takes part in the shadow passes.
getter/setter pair
- shadowIsStatic ↔ bool
-
Whether this caster never moves.
getter/setter pair
- skeleton ↔ Skeleton?
-
The skeleton deforming this mesh, when it is skinned.
getter/setter pair
- skinReach ↔ double
-
How far the surface reaches from its joints, in the mesh's own units.
getter/setter pair
- visible ↔ bool
-
Whether this node and its subtree are drawn.
getter/setter pairinherited
- visibleInHierarchy → bool
-
True when this node and every ancestor is visible.
no setterinherited
- worldBounds → Aabb3
-
World-space axis-aligned bounds, recomputed only when the transform changes.
no setter
- worldBoundsCentre → Vector3
-
Centre of the world bounding sphere used for the cheap culling test.
no setter
- worldBoundsRadius → double
-
no setter
- worldIsMirrored → bool
-
True when the world transform mirrors, i.e. its determinant is negative.
no setter
- worldMatrix → Matrix4
-
The node-to-world transform, always current.
no setterinherited
- worldNormalMatrix → Matrix4
-
Inverse-transpose of the world matrix, for transforming normals.
no setter
- worldVersion → int
-
Changes whenever worldMatrix changes. Use it as an invalidation key.
no setterinherited
Methods
-
add(
SceneNode child) → void -
Adds
child, keeping its local transform (so it moves with this node).inherited -
attach(
SceneNode child) → void -
Adds
childwhile preserving its current world transform.inherited -
bindToScene(
Scene? scene) → void -
Binds this node's subtree to
scene. Called by Scene for its own root; user code attaches nodes with add instead.inherited -
findByName(
String target) → SceneNode? -
First descendant with a matching name, or null.
inherited
-
lookAt(
Vector3 target, {Vector3? up}) → void -
Points the node's local -Z at
target, given in world space.inherited -
markBoundsDirty(
) → void - Says the cached bounds no longer describe the node.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAttachedToScene(
Scene scene) → void -
Hook for subclasses to register themselves in the scene's flat registries.
override
-
onDetachedFromScene(
Scene scene) → void -
override
-
readPosition(
[Vector3? out]) → Vector3 -
Reads the local position into
outto avoid allocating.inherited -
readRotation(
[Quaternion? out]) → Quaternion -
inherited
-
readScale(
[Vector3? out]) → Vector3 -
inherited
-
readWorldPosition(
[Vector3? out]) → Vector3 -
inherited
-
remove(
SceneNode child) → void -
inherited
-
removeFromParent(
) → void -
Detaches this node from its parent.
inherited
-
setLocalForward(
Vector3 direction, {Vector3? up}) → void -
Aims the node's local -Z along
direction, expressed in the parent's space.inherited -
setLocalMatrix(
Matrix4 value) → void -
Replaces the local transform by decomposing a matrix.
inherited
-
setPosition(
double x, double y, double z) → void -
inherited
-
setPositionFrom(
Vector3 value) → void -
inherited
-
setRotation(
Quaternion value) → void -
inherited
-
setRotationYawPitchRoll(
double yaw, double pitch, double roll) → void -
Yaw about Y, then pitch about X, then roll about Z — the order that reads
naturally for cameras and turntables.
inherited
-
setScale(
double x, double y, double z) → void -
inherited
-
setUniformScale(
double value) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
double dx, double dy, double dz) → void -
inherited
-
traverse(
void visit(SceneNode child)) → void -
Walks this node and its descendants.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited