pub struct Corridor {
pub az: f32,
}Expand description
A corridor radiating from a center at azimuth az — the frame every
wing-like structure positions and TURNS its pieces in. The yaw helpers
are the whole point: wall/beam skew bugs come from hand-deriving these
signs per call site. Derive once, test once, reuse everywhere.
Frame: dir runs outward along the corridor; side is the lateral axis
(positive = to the right when walking outward). Placement yaw convention:
a yaw of ψ maps local +X to (cos ψ, −sin ψ) and local +Z (a quad’s
normal) to (sin ψ, cos ψ).
Fields§
§az: f32Implementations§
Source§impl Corridor
impl Corridor
pub fn new(az: f32) -> Self
Sourcepub fn at(&self, r: f32, side: f32, lift: f32) -> [f32; 3]
pub fn at(&self, r: f32, side: f32, lift: f32) -> [f32; 3]
A point r out along the corridor, side across it, lift up.
Sourcepub fn yaw_along(&self) -> f32
pub fn yaw_along(&self) -> f32
Yaw for an X-long element RUNNING DOWN the corridor (side walls).
Sourcepub fn yaw_across(&self) -> f32
pub fn yaw_across(&self) -> f32
Yaw for an X-long element SPANNING the corridor (lintels, end walls) — also the yaw for a quad FACING BACK toward the corridor’s origin (gate titles, end paintings: the visitor walks outward into them).
Sourcepub fn yaw_face_in(&self, side: f32) -> f32
pub fn yaw_face_in(&self, side: f32) -> f32
Yaw for a quad on the corridor’s side, FACING the centerline —
reading boards mounted on a side wall.