MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ to_lanes()

template<typename T>
std::array< double, k_lanes > MayaFlux::ControlValue::to_lanes ( T value)
inlinestaticprivatenoexcept

Definition at line 165 of file ControlValue.hpp.

166 {
167 std::array<double, k_lanes> lanes {};
168 if constexpr (is_vector<T>) {
169 for (size_t index = 0; index < glm_component_count<T>(); ++index) {
170 lanes[index] = value[static_cast<glm::length_t>(index)];
171 }
172 } else if constexpr (is_box<T>) {
173 lanes = { value.min.x, value.min.y, value.min.z, value.max.x, value.max.y, value.max.z };
174 } else if constexpr (std::is_enum_v<T>) {
175 lanes[0] = static_cast<double>(static_cast<std::underlying_type_t<T>>(value));
176 } else {
177 lanes[0] = static_cast<double>(value);
178 }
179 return lanes;
180 }
double value() const noexcept
The value as a double.
static constexpr bool is_box
static constexpr bool is_vector

References is_box, is_vector, and value().

Referenced by ControlValue(), and observe().

Here is the call graph for this function:
Here is the caller graph for this function: