|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::Nexus::recenter_attachment | ( | Attachment & | attachment, |
| std::optional< glm::vec3 > & | position, | ||
| const std::optional< glm::quat > & | orientation | ||
| ) |
Read the buffer's geometry again and move the anchor to match.
The Agent stays where it is: its offset from the new anchor absorbs the difference. Blocks for a ComputeMeshBuffer, so call it off the graphics thread.
| attachment | Attachment to recenter. |
| position | Position of the Agent. Set if empty. |
| orientation | Orientation of the Agent, if it has one. |
Definition at line 129 of file Attachment.cpp.
References MayaFlux::Nexus::Attachment::anchor, MayaFlux::Nexus::Attachment::applied, MayaFlux::Nexus::Attachment::buf, MayaFlux::Nexus::Attachment::config, MayaFlux::Nexus::AttachConfig::index, MF_WARN, MayaFlux::Journal::Nexus, MayaFlux::Nexus::AttachConfig::offset, position, read_anchor(), MayaFlux::Journal::Runtime, and MayaFlux::Nexus::Attachment::transform.
Referenced by MayaFlux::Nexus::Agent::recenter(), and MayaFlux::Nexus::Emitter::recenter().
Here is the call graph for this function:
Here is the caller graph for this function: