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

◆ pivot_transform()

MAYAFLUX_API glm::mat4 MayaFlux::Kinesis::pivot_transform ( const glm::vec3 &  pivot,
const glm::vec3 &  target,
const glm::quat &  rotation 
)

Rigid transform that rotates about a local pivot and lands the pivot on a world point.

Parameters
pivotPoint in local space that stays fixed under the rotation
targetWorld-space point the pivot is placed on
rotationRotation applied about the pivot
Returns
Matrix mapping local space to world space

Definition at line 253 of file GeometryPrimitives.cpp.

257{
258 const glm::mat4 rotate = glm::mat4_cast(rotation);
259 return glm::translate(glm::mat4(1.0F), target - glm::vec3(rotate * glm::vec4(pivot, 1.0F))) * rotate;
260}

Referenced by MayaFlux::Nexus::apply_attachment().

+ Here is the caller graph for this function: