wren
Vulkan-based game engine
Loading...
Searching...
No Matches
transform.hpp
Go to the documentation of this file.
1#pragma once
2
7
9
10struct Transform {
14
15 [[nodiscard]] auto matrix() const {
17 math::Mat4f rotate = math::Quaternionf(rotation).to_mat();
18 // math::Mat4f scale{};
19
20 return translate * rotate;
21 }
22};
23
24} // namespace wren::scene::components
static constexpr auto identity()
Definition matrix.hpp:18
Quaternion< float > Quaternionf
Definition quaternion.hpp:72
auto translate(Mat4f mat, Vec4f offset) -> Mat4f
Definition geometry.cpp:34
Definition mesh.hpp:11
Definition matrix.hpp:86
Definition vector.hpp:133
Definition transform.hpp:10
auto matrix() const
Definition transform.hpp:15
math::Vec3f scale
Definition transform.hpp:13
math::Vec3f position
Definition transform.hpp:11
math::Vec3f rotation
Definition transform.hpp:12