|
| float | tachyon::Dot (float3 a, float3 b) |
| float3 | tachyon::Cross (float3 a, float3 b) |
| float | tachyon::Length (float3 v) |
| float3 | tachyon::Normalize (float3 v) |
| | v at length 1; zero stays zero.
|
| float3 | tachyon::Scale (float3 a, float3 b) |
| float4 | tachyon::Mul (const float4x4 &m, float4 v) |
| float3 | tachyon::TransformPoint (const float4x4 &m, float3 p) |
| | A point through m, divided by w.
|
| float4x4 | tachyon::Translation (float3 t) |
| float4x4 | tachyon::TRS (float3 position, quat rotation, float3 scale) |
| | Scale, then rotate, then move: an object's transform in the world.
|
| float4x4 | tachyon::LookAt (float3 eye, float3 target, float3 up) |
| | The view matrix of a camera at eye looking at target, up roughly up.
|
| float4x4 | tachyon::Perspective (float fovY, float aspect, float nearZ, float farZ) |
| | A perspective projection to Vulkan's clip space: fovY in radians, aspect width over height.
|
| float4x4 | tachyon::ToClipSpace (float4x4 projection, GraphicsAPI api) |
| | A projection to Vulkan's clip space (Perspective, Orthographic) made one to api's: Direct3D's, Metal's and SDL GPU's (on every driver) have y up, so the y row is negated; depth runs 0 to 1 in all.
|
| float4x4 | tachyon::Orthographic (float height, float aspect, float nearZ, float farZ) |
| | An orthographic projection to Vulkan's clip space, height world units high.
|
| float4x4 | tachyon::Inverse (const float4x4 &m) |
| | m's inverse; the identity when it has none.
|
| float | tachyon::IntersectPlane (const Ray &ray, float3 point, float3 normal) |
| | How far along ray it meets the plane through point with normal; negative or NaN when it doesn't (parallel, or behind).
|
| float | tachyon::ClosestOnLine (const Ray &ray, float3 point, float3 direction) |
| | Where along the line through point with direction (length 1) it comes closest to ray; NaN when they're parallel.
|