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

◆ apply_attachment()

MAYAFLUX_API void MayaFlux::Nexus::apply_attachment ( Attachment &  attachment,
const InfluenceContext &  ctx 
)

Rebuild the transform from ctx and place every render processor of the buffer.

Parameters
attachmentAttachment to apply.
ctxCurrent InfluenceContext.

Definition at line 153 of file Attachment.cpp.

154{
155 const glm::quat rotation = frame(ctx.orientation);
156
157 *attachment.transform = Kinesis::pivot_transform(
158 attachment.anchor,
159 ctx.position - rotation * attachment.config.offset,
160 rotation);
161
162 place_attachment(attachment);
163}
void place_attachment(Attachment &attachment)
Place every render processor of the buffer that is not placed yet.
glm::vec3 offset
Offset of the Agent from the anchor, in the Agent's own frame.
std::shared_ptr< glm::mat4 > transform
glm::vec3 position
Position of the influence point in world space.
Definition Influence.hpp:18
std::optional< glm::quat > orientation
Optional orientation of the influencer. Local +Z is its forward direction.
Definition Influence.hpp:30

References MayaFlux::Nexus::Attachment::anchor, MayaFlux::Nexus::Attachment::config, MayaFlux::Nexus::AttachConfig::offset, MayaFlux::Nexus::InfluenceContext::orientation, MayaFlux::Kinesis::pivot_transform(), place_attachment(), MayaFlux::Nexus::InfluenceContext::position, and MayaFlux::Nexus::Attachment::transform.

Referenced by MayaFlux::Nexus::Emitter::invoke(), and MayaFlux::Nexus::Agent::invoke_influence().

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