Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::Locator Struct Reference

Represents a point attached to a joint in a skeleton. More...

#include <locator.h>

Public Member Functions

 Locator (const std::string &name="uninitialized", const size_t parent=kInvalidIndex, const Vector3f &offset=Vector3f::Zero(), const Vector3i &locked=Vector3i::Zero(), const float weight=1.0f, const Vector3f &limitOrigin=Vector3f::Zero(), const Vector3f &limitWeight=Vector3f::Zero(), bool attachedToSkin=false, float skinOffset=0.0f)
bool operator== (const Locator &locator) const
 Equality comparison; uses approximate (isApprox) comparison for floating-point fields.

Public Attributes

std::string name
size_t parent
 Index of the parent joint in the skeleton.
Vector3f offset
 Position in the parent joint's local coordinate frame.
Vector3i locked
 Per-axis lock flags (x, y, z): 1 = locked, 0 = free.
float weight
 Influence weight when used as a constraint in error functions.
Vector3f limitOrigin
 Reference position for limit constraints; typically equals offset when loaded.
Vector3f limitWeight
 Per-axis strength pulling the locator back toward limitOrigin.
bool attachedToSkin = false
 True if the locator is attached to the skin of a person (e.g.
float skinOffset = 0.0f
 Offset from the skin surface, used when solving for body shape using locators.

Detailed Description

Represents a point attached to a joint in a skeleton.

Locators can be used for various purposes such as tracking specific points on a character, defining constraints, or serving as targets for inverse kinematics.

Definition at line 19 of file locator.h.

Constructor & Destructor Documentation

◆ Locator()

momentum::Locator::Locator ( const std::string & name = "uninitialized",
const size_t parent = kInvalidIndex,
const Vector3f & offset = Vector3f::Zero(),
const Vector3i & locked = Vector3i::Zero(),
const float weight = 1.0f,
const Vector3f & limitOrigin = Vector3f::Zero(),
const Vector3f & limitWeight = Vector3f::Zero(),
bool attachedToSkin = false,
float skinOffset = 0.0f )
inline

Definition at line 48 of file locator.h.

References attachedToSkin, momentum::kInvalidIndex, limitOrigin, limitWeight, locked, name, offset, parent, skinOffset, and weight.

Referenced by operator==().

Member Function Documentation

◆ operator==()

bool momentum::Locator::operator== ( const Locator & locator) const
inline

Equality comparison; uses approximate (isApprox) comparison for floating-point fields.

Definition at line 69 of file locator.h.

References attachedToSkin, momentum::isApprox(), limitOrigin, limitWeight, Locator(), locked, name, offset, parent, skinOffset, and weight.

Member Data Documentation

◆ attachedToSkin

bool momentum::Locator::attachedToSkin = false

True if the locator is attached to the skin of a person (e.g.

as in mocap tracking); used to determine whether the locator can safely be converted to a skinned locator.

Definition at line 43 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), and operator==().

◆ limitOrigin

Vector3f momentum::Locator::limitOrigin

Reference position for limit constraints; typically equals offset when loaded.

Definition at line 35 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), operator==(), and momentum::skinnedLocatorsToLocators().

◆ limitWeight

Vector3f momentum::Locator::limitWeight

Per-axis strength pulling the locator back toward limitOrigin.

Zero on an axis disables the limit on that axis.

Definition at line 39 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), operator==(), and momentum::skinnedLocatorsToLocators().

◆ locked

Vector3i momentum::Locator::locked

Per-axis lock flags (x, y, z): 1 = locked, 0 = free.

Definition at line 29 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), operator==(), and momentum::skinnedLocatorsToLocators().

◆ name

◆ offset

◆ parent

◆ skinOffset

float momentum::Locator::skinOffset = 0.0f

Offset from the skin surface, used when solving for body shape using locators.

Definition at line 46 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), and operator==().

◆ weight

float momentum::Locator::weight

Influence weight when used as a constraint in error functions.

Definition at line 32 of file locator.h.

Referenced by momentum::createLocator(), momentum::loadLocatorsFromBuffer(), momentum::loadLocatorsFromUsd(), Locator(), operator==(), and momentum::skinnedLocatorsToLocators().


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