26 bool computeDeriv)
noexcept {
30 if (parentState !=
nullptr) {
31 parent = parentState->transform;
37 if (parentState !=
nullptr) {
44 localTransform.translation.noalias() = joint.translationOffset + parameters.template head<3>();
51 for (
int index = 2; index >= 0; --index) {
#define MT_CHECK(condition,...)
Runtime check macros with two interchangeable backends:
Eigen::Matrix< T, kParametersPerJoint, 1 > JointVectorT
Eigen::AngleAxis< T > AngleAxis
constexpr T ln2() noexcept
Returns the natural logarithm of 2 (log_e 2).
Eigen::Quaternion< T > Quaternion
Unit quaternion representing a 3D rotation.
const std::array< Vector3< T >, 3 > RotationAxis
decltype(auto) cast(const ContainerType< ObjectType > &originalContainer)
Casts the scalar type of objects in a container that support the cast<>() method.
Represents the state of a joint with local and global transformations.
Vector3< T > getTranslationDerivative(size_t index) const
Calculates the derivative with respect to translation along a specific axis.
TransformT< T > localTransform
Local transformation relative to parent joint.
Vector3< T > getRotationDerivative(size_t index, const Vector3< T > &ref) const
Calculates the derivative of a point with respect to rotation around a specific axis.
Vector3< T > getScaleDerivative(const Vector3< T > &ref) const noexcept
Calculates the derivative of a point with respect to uniform scaling.
Matrix3< T > rotationAxis
Rotation axes in global space.
Matrix3< T > translationAxis
Translation axes in global space.
TransformT< T > transform
Global transformation in world space.
void set(const JointT< T > &joint, const JointVectorT< T > ¶meters, const JointStateT< T > *parentState=nullptr, bool computeDeriv=true) noexcept
Updates joint state based on joint definition and parameters.
bool derivDirty
Indicates if derivative data needs recomputation.
A simplified version of a Maya joint with pre-rotation only (no post-rotation).