Skip to main content

Vec3Component.ixx File

Included Headers

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

Namespaces Index

namespacehelios
namespaceengine
namespacecore
namespacecomponents

Classes Index

classVec3Component<TDomainTag, TNumericType, Args>

Generic 3D value component with dirty-state tracking. More...

File Listing

The file content with the documentation metadata removed is:

1module;
2
3#include <cassert>
4
5export module helios.engine.core.components.Vec3Component;
6
7import helios.math.types;
8
9import helios.math.concepts;
10
11using namespace helios::math;
12using namespace helios::math::concepts;
14
22 template<typename TDomainTag, typename TNumericType, typename ... Args>
25
26 helios::math::vec3<TNumericType> value_{};
27
28 bool isDirty_ = true;
29
30 public:
31
32 Vec3Component() = default;
33
39 explicit Vec3Component(const vec3<TNumericType> value) : value_(value){}
40
48 explicit Vec3Component(
49 const TNumericType x, const TNumericType y, const TNumericType z)
50 : value_(x, y, z){}
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
115 return value_;
116 }
117
123 void setValue(const vec3<TNumericType> value) noexcept {
124 value_ = value;
125 isDirty_ = true;
126 };
127
128
129 };
130
131}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.