MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / rotate_loop_2D

Function rotate_loop_2D

tools/Wires/Inflator/WireProfile.cpp:10–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9namespace WireProfileHelper {
10 MatrixFr rotate_loop_2D(const MatrixFr& loop, const VectorF& dir) {
11 const Float angle = atan2(-dir[0], dir[1]);
12 Eigen::Rotation2D<Float> rotation(angle);
13 return (rotation.toRotationMatrix() * loop.transpose()).transpose();
14 }
15
16 MatrixFr rotate_loop_3D(const MatrixFr& loop, const VectorF& dir) {
17 const Vector3F X(1, 0, 0);

Callers 1

placeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected