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

◆ apply_rotation()

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 191 of file GeometryPrimitives.cpp.

196{
197 glm::vec3 normalized_axis = glm::normalize(axis);
198
199 glm::mat4 transform = glm::translate(glm::mat4(1.0F), origin);
200 transform = glm::rotate(transform, angle, normalized_axis);
201 transform = glm::translate(transform, -origin);
202
203 apply_transform(vertices, transform);
204}
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: