Stdlib index
- Captured-borrow migration worklist (3.3.3)
- Owned-bind migration worklist (8.2.7)
- Return-side title audit — the ride-through enumeration
- stdlib ownership audit
- stdlib ownership dispositions (plan 1.3.1 / 4.3.1)
codec
codec / csv
codec / json
collection
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
error
gfx
hash
ifx
io
io / file
io / net
io / net / dns
io / net / tls
io / net / uri
lang
lang / stream
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
nucleo
- Columns — the Arrow-laid-out substrate
- Fused tensor expressions — Fuse
- Table — the lazy, typed dataframe
- Tape — define-by-run autograd
- Transform intrinsics — Grad, Vmap, Jit
process
reflect
search / distance
search / fuzzy
search / ngram
session
time
- Clock
- DateTimeFormatter
- Duration
- Instant
- LocalDate
- LocalDateTime
- LocalTime
- Period
- ZonedDateTime
- ZoneId
- ZoneOffset
wire
xpu
xpu / mesh
Ray
cajeta.math.Ray — a half-line origin + t * direction for t >= 0, the
parametric query primitive shared by picking, culling, and the software
ray-query paths. A value type over the builtin Vector<float32,3>:
stack-allocated by default, no heap, no drop chain. direction is stored
as-given (not auto-normalized); intersection helpers that assume a unit
direction document that requirement.
package snip.ray;
import cajeta.math.Ray;
public final class Demo {
public static void run() {
Vector<float32,3> o = stack Vector<float32,3>(0.0f, 0.0f, 0.0f);
Vector<float32,3> d = stack Vector<float32,3>(0.0f, 0.0f, 1.0f);
Ray r = stack Ray(o, d);
Vector<float32,3> p = r.at(5.0f); // (0, 0, 5)
return;
}
}
Methods
| Signature | |
|---|---|
Ray(Vector<float32,3> origin, Vector<float32,3> direction) ⚑ | Build a ray from its origin and direction (direction stored as given) |
Vector<float32,3> origin() | The ray’s start point |
Vector<float32,3> direction() | The ray’s direction (stored as given; not auto-normalized) |
Vector<float32,3> at(float32 t) | The point origin + t * direction |
⚑ = @EntryPoint
See also
- Source:
runtime/src/cajeta/math/Ray.cajeta - Camera — view/projection builders for picking, Transform — object placement