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

◆ declare_vector()

VectorRef MayaFlux::Buffers::VolumeGridBuffer::declare_vector ( std::string  name,
Kinesis::LatticeSemantics  semantics = {} 
)

Declare a double-buffered vector field.

Parameters
nameLookup key, unique within this volume.
semanticsWhat the values mean. A velocity field wants VectorVariance::ContravariantRelative; the default assumes three unrelated scalars.
Returns
Ref naming the field, or a ref with an empty name if the declaration was rejected.

Definition at line 189 of file VolumeGridBuffer.cpp.

190{
191 if (!allocate_field(name, sizeof(glm::vec4), true, semantics)) {
192 return {};
193 }
194
195 return VectorRef {
196 .name = std::move(name),
197 .owner = std::dynamic_pointer_cast<VolumeGridBuffer>(shared_from_this()),
198 };
199}
std::string name
Definition VKDevice.cpp:123
bool allocate_field(const std::string &name, size_t stride_bytes, bool double_buffered)
Allocate one field's slots and register it.

References allocate_field(), MayaFlux::Buffers::VectorRef::name, and name.

+ Here is the call graph for this function: