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

◆ as_float()

std::span< const float > MayaFlux::Kakshya::TextureContainer::as_float ( uint32_t  layer = 0) const

Typed view over the float variant.

Returns an empty span if the layer's variant is not float.

Definition at line 333 of file TextureContainer.cpp.

334{
335 if (layer >= m_data.size())
336 return {};
337 const auto* v = std::get_if<std::vector<float>>(&m_data[layer]);
338 return v ? std::span<const float>(v->data(), v->size()) : std::span<const float> {};
339}