Files
allwpilib/wpimath/src/main/python/semiwrap/geometry/Rotation3d.yml
PJ Reiniger 44b9cc1398 [robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a

This mirrors the robotpy files for the following projects:
- apriltag
- datalog
- hal
- ntcore
- romiVendordep
- wpilibc
- wpimath
- xrpVendordep

This excludes cscore and the halsim wrappers for at this time.

NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
2025-10-23 22:28:04 -07:00

72 lines
2.0 KiB
YAML

extra_includes:
- rpy/geometryToString.h
- wpystruct.h
functions:
to_json:
ignore: true
from_json:
ignore: true
classes:
frc::Rotation3d:
methods:
Rotation3d:
overloads:
'':
const Quaternion&:
keepalive: []
units::radian_t, units::radian_t, units::radian_t:
const Eigen::Vector3d&, units::radian_t:
keepalive: []
const Eigen::Vector3d&:
keepalive: []
const Eigen::Matrix3d&:
keepalive: []
const Eigen::Vector3d&, const Eigen::Vector3d&:
keepalive: []
const Rotation2d&:
keepalive: []
operator+:
operator-:
overloads:
const Rotation3d& [const]:
'[const]':
operator*:
operator/:
operator==:
RotateBy:
GetQuaternion:
X:
Y:
Z:
Axis:
Angle:
ToMatrix:
ToRotation2d:
ToVector:
inline_code: |
cls_Rotation3d
.def_static("fromDegrees", [](units::degree_t roll, units::degree_t pitch, units::degree_t yaw) {
return std::make_unique<Rotation3d>(roll, pitch, yaw);
}, py::arg("roll"), py::arg("pitch"), py::arg("yaw"))
.def_property_readonly("x", &Rotation3d::X)
.def_property_readonly("y", &Rotation3d::Y)
.def_property_readonly("z", &Rotation3d::Z)
.def_property_readonly("angle", &Rotation3d::Angle)
.def_property_readonly("x_degrees", [](const Rotation3d * self) -> units::degree_t {
return self->X();
})
.def_property_readonly("y_degrees", [](const Rotation3d * self) -> units::degree_t {
return self->Y();
})
.def_property_readonly("z_degrees", [](const Rotation3d * self) -> units::degree_t {
return self->Z();
})
.def_property_readonly("angle_degrees", [](const Rotation3d * self) -> units::degree_t {
return self->Angle();
})
.def("__repr__", py::overload_cast<const Rotation3d&>(&rpy::toString));
SetupWPyStruct<frc::Rotation3d>(cls_Rotation3d);