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

◆ slice_of()

FormaTarget MayaFlux::Portal::Forma::FormaTarget::slice_of ( const std::shared_ptr< Buffers::FormaBuffer > &  buffer,
std::optional< Graphics::PrimitiveTopology >  topology = std::nullopt 
)
static

A new empty slice of buffer, drawn after the others.

Hands several creators one buffer. Slices of a topology other than the buffer's need a buffer set up to triangulate.

Returns
An empty handle if the buffer is not ready for slices.

Definition at line 19 of file Target.cpp.

22{
23 if (!buffer) {
24 return {};
25 }
26 const auto slice = buffer->add_slice({}, topology);
27 return slice == 0 ? FormaTarget {} : FormaTarget(buffer, slice);
28}
PrimitiveTopology topology
SliceId slice() const noexcept
Slice id, 0 when the handle means the whole buffer.
Definition Target.cpp:46
const std::shared_ptr< Buffers::FormaBuffer > & buffer() const noexcept
The underlying buffer; null for an empty handle.
Definition Target.cpp:40

References MayaFlux::Buffers::FormaBuffer::add_slice(), buffer(), FormaTarget(), slice(), and topology.

Referenced by MayaFlux::Portal::Forma::internal::add_text_row(), MayaFlux::Portal::Forma::Inspector::make_row_buffers(), MayaFlux::Portal::Forma::internal::Atelier::place_adornments(), and MayaFlux::Portal::Forma::plot().

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