MayaFlux 0.5.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 397 of file TextureContainer.cpp.

398{
399 if (layer >= m_data.size())
400 return {};
401 const auto* v = std::get_if<std::vector<float>>(&m_data[layer]);
402 return v ? std::span<const float>(v->data(), v->size()) : std::span<const float> {};
403}