math: Declare Ray, Rayh, and Rayd types
This commit is contained in:
parent
24b9a415b3
commit
4d6b3e200f
1 changed files with 3 additions and 4 deletions
|
|
@ -53,6 +53,7 @@ pub const Vec4 = vec.Vec(4, f32);
|
||||||
pub const Quat = q.Quat(f32);
|
pub const Quat = q.Quat(f32);
|
||||||
pub const Mat3x3 = mat.Mat(3, 3, Vec4);
|
pub const Mat3x3 = mat.Mat(3, 3, Vec4);
|
||||||
pub const Mat4x4 = mat.Mat(4, 4, Vec4);
|
pub const Mat4x4 = mat.Mat(4, 4, Vec4);
|
||||||
|
pub const Ray = ray.Ray(Vec3);
|
||||||
|
|
||||||
/// Half-precision f16 types
|
/// Half-precision f16 types
|
||||||
pub const Vec2h = vec.Vec(2, f16);
|
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 Quath = q.Quat(f16);
|
||||||
pub const Mat3x3h = mat.Mat(3, 3, Vec4h);
|
pub const Mat3x3h = mat.Mat(3, 3, Vec4h);
|
||||||
pub const Mat4x4h = mat.Mat(4, 4, Vec4h);
|
pub const Mat4x4h = mat.Mat(4, 4, Vec4h);
|
||||||
|
pub const Rayh = ray.Ray(Vec3h);
|
||||||
|
|
||||||
/// Double-precision f64 types
|
/// Double-precision f64 types
|
||||||
pub const Vec2d = vec.Vec(2, f64);
|
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 Quatd = q.Quat(f64);
|
||||||
pub const Mat3x3d = mat.Mat(3, 3, Vec4d);
|
pub const Mat3x3d = mat.Mat(3, 3, Vec4d);
|
||||||
pub const Mat4x4d = mat.Mat(4, 4, Vec4d);
|
pub const Mat4x4d = mat.Mat(4, 4, Vec4d);
|
||||||
|
pub const Rayd = ray.Ray(Vec3d);
|
||||||
|
|
||||||
/// Standard f32 precision initializers
|
/// Standard f32 precision initializers
|
||||||
pub const vec2 = Vec2.init;
|
pub const vec2 = Vec2.init;
|
||||||
|
|
@ -94,10 +97,6 @@ pub const quatd = Quatd.init;
|
||||||
pub const mat3x3d = Mat3x3d.init;
|
pub const mat3x3d = Mat3x3d.init;
|
||||||
pub const mat4x4d = Mat4x4d.init;
|
pub const mat4x4d = Mat4x4d.init;
|
||||||
|
|
||||||
// Rays in 3 dimensional space
|
|
||||||
pub const Ray = ray.Ray;
|
|
||||||
pub const RayHit = ray.RayHit;
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
testing.refAllDeclsRecursive(@This());
|
testing.refAllDeclsRecursive(@This());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue