diff options
Diffstat (limited to 'src/o3d/deriv_vertex.hpp')
| -rw-r--r-- | src/o3d/deriv_vertex.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/o3d/deriv_vertex.hpp b/src/o3d/deriv_vertex.hpp new file mode 100644 index 0000000..bc47780 --- /dev/null +++ b/src/o3d/deriv_vertex.hpp @@ -0,0 +1,21 @@ +#ifndef O3D_DERIV_VERTEX_H +#define O3D_DERIV_VERTEX_H + +#include "math/vector.hpp" + +namespace engine::o3d { + +using engine::math::Vector4; + +struct DerivedVertex { + Vector4 vertex; + float b0, b1; + + constexpr DerivedVertex div_by_w() const & { + return {vertex.div_by_w(), b0, b1}; + } +}; + +} + +#endif // O3D_DERIV_VERTEX_H |
