Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::JointT< T > Struct Template Reference

A simplified version of a Maya joint with pre-rotation only (no post-rotation). More...

#include <joint.h>

Public Types

using Scalar = T

Public Member Functions

bool isApprox (const JointT< T > &joint, const T &rotTol=Eps< T >(1e-4, 1e-10), const T &tranTol=Eigen::NumTraits< Scalar >::dummy_precision()) const
 Checks if the current joint is approximately equal to the provided joint.
template<typename U>
auto cast () const
 Casts the current joint to another scalar type.

Public Attributes

std::string name {"uninitialized"}
size_t parent {kInvalidIndex}
 Index of the parent joint in the skeleton hierarchy, or kInvalidIndex for the root.
Quaternion< T > preRotation = Quaternion<T>::Identity()
 Pre-rotation from the parent joint's axes to this joint's local axes.
Vector3< T > translationOffset = Vector3<T>::Zero()
 Constant translation offset from the parent joint's origin to this joint's origin, expressed in the parent's local frame.

Detailed Description

template<typename T>
struct momentum::JointT< T >

A simplified version of a Maya joint with pre-rotation only (no post-rotation).

Definition at line 18 of file joint.h.

Member Typedef Documentation

◆ Scalar

template<typename T>
using momentum::JointT< T >::Scalar = T

Definition at line 19 of file joint.h.

Member Function Documentation

◆ cast()

template<typename T>
template<typename U>
auto momentum::JointT< T >::cast ( ) const
inlinenodiscard

Casts the current joint to another scalar type.

Definition at line 64 of file joint.h.

Referenced by momentum::JointT< float >::cast().

◆ isApprox()

template<typename T>
bool momentum::JointT< T >::isApprox ( const JointT< T > & joint,
const T & rotTol = Eps<T>(1e-4, 1e-10),
const T & tranTol = Eigen::NumTraits<Scalar>::dummy_precision() ) const
inlinenodiscard

Checks if the current joint is approximately equal to the provided joint.

Definition at line 39 of file joint.h.

Member Data Documentation

◆ name

◆ parent

◆ preRotation

template<typename T>
Quaternion<T> momentum::JointT< T >::preRotation = Quaternion<T>::Identity()

Pre-rotation from the parent joint's axes to this joint's local axes.

Applied before the joint's own rotation parameters.

Note
Default-initialized via = rather than braces due to a CUDA 11 compiler bug with brace-initialization of Eigen's Quaternion.

Definition at line 32 of file joint.h.

Referenced by momentum::addGloveBones(), momentum::addRigidTransformNode(), momentum::JointT< float >::cast(), momentum::createJoint(), momentum::JointT< float >::isApprox(), and momentum::loadSkeletonFromUsd().

◆ translationOffset

template<typename T>
Vector3<T> momentum::JointT< T >::translationOffset = Vector3<T>::Zero()

Constant translation offset from the parent joint's origin to this joint's origin, expressed in the parent's local frame.

Definition at line 36 of file joint.h.

Referenced by momentum::addGloveBones(), momentum::addRigidTransformNode(), momentum::JointT< float >::cast(), momentum::createJoint(), momentum::createLocatorCharacter(), momentum::JointT< float >::isApprox(), momentum::fbx_internal::jointParamToFbx(), and momentum::loadSkeletonFromUsd().


The documentation for this struct was generated from the following files: