Skip to main content

Vec4Component.ixx File

Generic 4D vector 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

classVec4Component<TDomainTag, TNumericType, Args>

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

Description

Generic 4D vector 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.Vec4Component;
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::vec4<TNumericType> value_{};
31
32 bool isDirty_ = true;
33
34 public:
35
36 Vec4Component() = default;
37
43 explicit Vec4Component(const vec4<TNumericType> value) : value_(value){}
44
53 explicit Vec4Component(
54 const TNumericType x, const TNumericType y, const TNumericType z, const TNumericType w)
55 : value_(x, y, z, w){}
56
66 value_(other.value_),
67 isDirty_(true) {}
68
75
82 isDirty_ = true;
83 }
84
91 isDirty_ = true;
92 }
93
98 isDirty_ = false;
99 }
100
107 return isDirty_;
108 }
109
116 return value_;
117 }
118
125 return value_;
126 }
127
133 void setValue(const vec4<TNumericType> value) noexcept {
134 value_ = value;
135 isDirty_ = true;
136 };
137
138
139 };
140
141}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.