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

◆ apply_rotation()

MAYAFLUX_API void MayaFlux::Kinesis::apply_rotation ( std::vector< glm::vec3 > &  vertices,
const glm::vec3 &  axis,
float  angle,
const glm::vec3 &  origin = glm::vec3(0) 
)

Apply rotation to vertex set around arbitrary axis.

Parameters
verticesVertices to transform (modified in-place)
axisRotation axis (will be normalized)
angleRotation angle in radians (right-hand rule)
originRotation pivot (default: coordinate origin)

Definition at line 192 of file GeometryPrimitives.cpp.

197{
198 glm::vec3 normalized_axis = glm::normalize(axis);
199
200 glm::mat4 transform = glm::translate(glm::mat4(1.0F), origin);
201 transform = glm::rotate(transform, angle, normalized_axis);
202 transform = glm::translate(transform, -origin);
203
204 apply_transform(vertices, transform);
205}
void apply_transform(std::vector< glm::vec3 > &vertices, const glm::mat4 &transform)
Apply rigid transformation to vertex set.

References apply_transform().

+ Here is the call graph for this function: