Skip to main content

Mat4Component.ixx File

Generic 4x4 matrix ECS component with dirty-state tracking. More...

Included Headers

#include <cassert> #include <helios.math.concepts> #include <helios.math.types>

Namespaces Index

namespacehelios
namespaceengine
namespacecore
namespacecomponents

Classes Index

classMat4Component<TDomainTag, TNumericType, Args>

Generic 4x4 matrix component with dirty-state tracking. More...

Description

Generic 4x4 matrix ECS component with dirty-state tracking.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <cassert>
8
9export module helios.engine.core.components.Mat4Component;
10
11import helios.math.types;
12
13import helios.math.concepts;
14
15using namespace helios::math;
16using namespace helios::math::concepts;
18
26 template<typename TDomainTag, typename TNumericType, typename ... Args>
29
30 helios::math::mat4<TNumericType> value_{};
31
32 bool isDirty_ = true;
33
34 public:
35
36 Mat4Component() = default;
37
43 explicit Mat4Component(const mat4<TNumericType>& value) : value_(value){}
44
50 explicit Mat4Component(const TNumericType value) : value_(mat4<TNumericType>{value}){}
51
61 value_(other.value_),
62 isDirty_(true) {}
63
70
77 isDirty_ = true;
78 }
79
86 isDirty_ = true;
87 }
88
93 isDirty_ = false;
94 }
95
102 return isDirty_;
103 }
104
111 return value_;
112 }
113
120 return value_;
121 }
122
128 void setValue(const mat4<TNumericType> value) noexcept {
129 value_ = value;
130 isDirty_ = true;
131 };
132
133
134 };
135
136}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.