-
Notifications
You must be signed in to change notification settings - Fork 5
ray.um
Marek Maskarinec edited this page Oct 9, 2022
·
2 revisions
This module will undergo changes.
type Ray* = struct {
pos: th.Vf2
l: th.fu // length
r: th.fu // rotation
}
Ray type.
fn mk*(pos: th.Vf2, l: th.fu, r: th.fu = 0.0): Ray {
Makes a ray.
fn (r: ^Ray) getColl*(s: []^ent.Ent, maxColls: th.uu): []ent.Coll {
Same as ent.getcoll. Same changes will apply.
fn (r: ^Ray) getTilemapColl*(t: tilemap.Tilemap, ic: ^th.Vf2): bool {
Gets ray's collision to a tilemap.
fn (r: ^Ray) draw*(cam: rect.Rect, color: uint32, thickness: th.fu) {