aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/deriv_vertex.hpp
blob: 6fc32e07326294d30ee704f1b6b57b28a9c37e2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef O3D_DERIV_VERTEX_HPP
#define O3D_DERIV_VERTEX_HPP

#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_HPP