SceneRaycastHit class Picking and input

A render-geometry intersection from raycastNode (or Scene.raycast).

Constructors

SceneRaycastHit({required Node node, required double distance, required Vector3 worldPoint, required Vector3 worldNormal, required Vector2? uv, required Vector3 barycentrics, required int triangleIndex, required int primitiveIndex})
Creates a hit record.

Properties

barycentrics → Vector3
Barycentric weights of the hit inside its triangle, ordered to match the triangle's vertex order.
final
distance double
Distance from the ray origin to worldPoint, measured along the normalized ray direction.
final
hashCode int
The hash code for this object.
no setterinherited
node Node
The node whose mesh was hit.
final
primitiveIndex int
The index of the hit MeshPrimitive within the node's mesh.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
triangleIndex int
The index of the hit triangle within its primitive's index/vertex stream.
final
uv → Vector2?
The interpolated texture coordinate at the hit, or null when the mesh carries no UV data (never a silent zero).
final
worldNormal → Vector3
The geometric (triangle face) normal at the hit, world space, unit length, oriented to face the ray origin.
final
worldPoint → Vector3
The intersection point, world space.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited