struct property

StructType<RayCollision> struct
final

Describes the raw memory layout, construction, and pointer representation of this struct type.

Implementation

static final StructType<RayCollision> struct = ._builtin(
  factory: RayCollision.new,
  layout: .aligned<RayCollisionField>({
    .hit:      RBool(), // Did the ray hit something?
    .distance: RFloat(), // Distance to the nearest hit
    .point:    RStruct(Vector3.struct), // Point of the nearest hit
    .normal:   RStruct(Vector3.struct), // Surface normal of hit
  }),
);