|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Nexus::Agent::attach | ( | const std::shared_ptr< Buffers::VKBuffer > & | buf, |
| const AttachConfig & | config = {} |
||
| ) |
Make an existing, already rendered buffer the look of this object.
The buffer is neither registered nor written to. Its geometry is read once and the object takes its position from the centroid, or from the vertex at config.index, plus config.offset. Every render processor the buffer has is placed at the object's position and orientation. If the object is moved from outside, config.on_move decides whether the move becomes the new offset or carries the buffer. If the object already has a position, that position is kept and becomes the offset. Replaces any previous attachment. The buffer is a live object, so an attachment is not part of encoded state and must be made again after decoding.
| buf | Buffer to attach. Ignored if null. |
| config | Anchor vertex, offset and move behaviour. |
Definition at line 16 of file Agent.cpp.
References detach(), follow_attachment(), MayaFlux::Journal::Init, m_attachment, m_orientation, MayaFlux::Nexus::make_attachment(), MF_ERROR, and MayaFlux::Journal::Nexus.
Here is the call graph for this function: