From 4d6b3e200f7f50aa78d9670adb60f216d7f12644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20D=2E=20Sch=C3=BCller?= Date: Tue, 3 Oct 2023 22:56:17 +0200 Subject: [PATCH] math: Declare Ray, Rayh, and Rayd types --- src/math/main.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/math/main.zig b/src/math/main.zig index 8ec2ccfa..6f6667dd 100644 --- a/src/math/main.zig +++ b/src/math/main.zig @@ -53,6 +53,7 @@ pub const Vec4 = vec.Vec(4, f32); pub const Quat = q.Quat(f32); pub const Mat3x3 = mat.Mat(3, 3, Vec4); pub const Mat4x4 = mat.Mat(4, 4, Vec4); +pub const Ray = ray.Ray(Vec3); /// Half-precision f16 types pub const Vec2h = vec.Vec(2, f16); @@ -61,6 +62,7 @@ pub const Vec4h = vec.Vec(4, f16); pub const Quath = q.Quat(f16); pub const Mat3x3h = mat.Mat(3, 3, Vec4h); pub const Mat4x4h = mat.Mat(4, 4, Vec4h); +pub const Rayh = ray.Ray(Vec3h); /// Double-precision f64 types pub const Vec2d = vec.Vec(2, f64); @@ -69,6 +71,7 @@ pub const Vec4d = vec.Vec(4, f64); pub const Quatd = q.Quat(f64); pub const Mat3x3d = mat.Mat(3, 3, Vec4d); pub const Mat4x4d = mat.Mat(4, 4, Vec4d); +pub const Rayd = ray.Ray(Vec3d); /// Standard f32 precision initializers pub const vec2 = Vec2.init; @@ -94,10 +97,6 @@ pub const quatd = Quatd.init; pub const mat3x3d = Mat3x3d.init; pub const mat4x4d = Mat4x4d.init; -// Rays in 3 dimensional space -pub const Ray = ray.Ray; -pub const RayHit = ray.RayHit; - test { testing.refAllDeclsRecursive(@This()); }