| 138 | } |
| 139 | |
| 140 | Vec3 TransformPoint(const Mat4& a, const Vec3& p) |
| 141 | { |
| 142 | Vec4 r = Transform(a, {p.x, p.y, p.z, 1.0f}); |
| 143 | float w = (r.w != 0.0f) ? r.w : 1.0f; |
| 144 | return {r.x / w, r.y / w, r.z / w}; |
| 145 | } |
| 146 | |
| 147 | Mat4 LookAt(const Vec3& eye, const Vec3& center, const Vec3& up) |
| 148 | { |