add option to do orthographic projection

This commit is contained in:
Gavin Ridley 2021-12-16 17:24:32 -05:00
parent d51fd873ab
commit 76cc722090
3 changed files with 65 additions and 12 deletions

View file

@ -83,6 +83,11 @@ struct Position {
return x * other.x + y * other.y + z * other.z;
}
inline double norm() const { return std::sqrt(x * x + y * y + z * z); }
inline Position cross(Position other) const
{
return {y * other.z - z * other.y, z * other.x - x * other.z,
x * other.y - y * other.x};
}
//! Reflect a direction across a normal vector
//! \param[in] other Vector to reflect across