Skip to content

Commit

Permalink
Adding missing signature for stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
scottenglert committed Jun 11, 2022
1 parent a5cba1e commit 48344b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/MEulerRotation.inl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ EulerRotation

.def("setValue", [](MEulerRotation & self, const MEulerRotation & rot) -> MEulerRotation& {
return self.setValue(rot.x, rot.y, rot.z, rot.order);
})
}, py::arg("rot"), _doc_EulerRotation_setValue)

.def("setValue", [](MEulerRotation & self, MVector vec, MEulerRotation::RotationOrder order = MEulerRotation::kXYZ) -> MEulerRotation& {
return self.setValue(vec, order);
Expand Down
25 changes: 15 additions & 10 deletions src/Math.inl
Original file line number Diff line number Diff line change
Expand Up @@ -279,33 +279,38 @@ Quaternion
.def("negateIt", &MQuaternion::negateIt)
.def("normal", &MQuaternion::normal)
.def("normalizeIt", &MQuaternion::normalizeIt)
.def("setToXAxis", &MQuaternion::setToXAxis)
.def("setToYAxis", &MQuaternion::setToYAxis)
.def("setToZAxis", &MQuaternion::setToZAxis)
.def("setToXAxis", &MQuaternion::setToXAxis, py::arg("angle"))
.def("setToYAxis", &MQuaternion::setToYAxis, py::arg("angle"))
.def("setToZAxis", &MQuaternion::setToZAxis, , py::arg("angle"))
.def("setValue", [](MQuaternion& self, const MQuaternion& quat) {
self = quat;
})
}, py::arg("quat"))

.def("setValue", [](MQuaternion& self, const MEulerRotation& rot) {
self = rot;
})
}, py::arg("rot"))

.def("setValue", [](MQuaternion& self, const MMatrix& matrix) {
self = matrix;
})
}, py::arg("matrix"))

.def("setValue", [](MQuaternion& self, const MVector& axis, double angle) {
self.setAxisAngle(axis, angle);
})
}, py::arg("axis"), py::arg("angle"))

.def_static("slerp", [](const MQuaternion& p, const MQuaternion& q, double t, short spin) {
return slerp(p, q, t, spin);
})
}py::arg("p"), py::arg("q"), py::arg("t"), py::arg("spin"))

.def_static("squad", [](const MQuaternion& p, const MQuaternion& a, const MQuaternion& b,
const MQuaternion& q, double t, short spin) {
return squad(p, a, b, q, t, spin);

})
}py::arg("p"), py::arg("a"), py::arg("b"), py::arg("q"), py::arg("t"), py::arg("spin"))

.def_static("squadPt", [](const MQuaternion& q0, const MQuaternion& q1, const MQuaternion& q2) {
return squadPt(q0, q1, q2);
})
}, py::arg("q0"), py::arg("q1"), py::arg("q2"))

.def("__len__", [](const MQuaternion &self) -> int {
return 4;
Expand Down

0 comments on commit 48344b8

Please sign in to comment.