Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
usd_skeleton_io.cpp File Reference
#include "momentum/io/usd/usd_skeleton_io.h"
#include "momentum/common/checks.h"
#include "momentum/common/exception.h"
#include "momentum/common/log.h"
#include "momentum/io/usd/usd_utils.h"
#include <pxr/base/tf/staticTokens.h>
#include <pxr/base/gf/matrix4d.h>
#include <pxr/base/gf/quatf.h>
#include <pxr/base/gf/vec2f.h>
#include <pxr/base/gf/vec3f.h>
#include <pxr/base/gf/vec3i.h>
#include <pxr/base/vt/array.h>
#include <pxr/usd/sdf/valueTypeName.h>
#include <pxr/usd/usd/primRange.h>
#include <pxr/usd/usdGeom/scope.h>
#include <pxr/usd/usdGeom/xform.h>
#include <pxr/usd/usdSkel/cache.h>
#include <pxr/usd/usdSkel/skeletonQuery.h>
#include <cctype>

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

PXR_NAMESPACE_USING_DIRECTIVE TF_DEFINE_PRIVATE_TOKENS (_tokens,(Collision)(Locators)((momentumType, "momentum:type"))((momentumParent, "momentum:parent"))((momentumLength, "momentum:length"))((momentumRadius, "momentum:radius"))((momentumRadii, "momentum:radii"))((momentumHalfExtents, "momentum:halfExtents"))((momentumTranslation, "momentum:translation"))((momentumRotation, "momentum:rotation"))((momentumName, "momentum:name"))((momentumOffset, "momentum:offset"))((momentumWeight, "momentum:weight"))((momentumLocked, "momentum:locked"))((momentumLimitOrigin, "momentum:limitOrigin"))((momentumLimitWeight, "momentum:limitWeight"))((momentumAttachedToSkin, "momentum:attachedToSkin"))((momentumSkinOffset, "momentum:skinOffset")))
std::vector< std::string > momentum::buildHierarchicalPaths (const Skeleton &skeleton)
 Build hierarchical joint paths from flat names and parent indices.
Skeleton momentum::loadSkeletonFromUsd (const UsdStageRefPtr &stage)
 Load a skeleton from a USD stage.
void momentum::saveSkeletonToUsd (const Skeleton &skeleton, UsdSkelSkeleton &skelPrim)
 Save a skeleton to a USD stage.
void momentum::saveCollisionGeometryToUsd (const CollisionGeometry &collision, const Skeleton &skeleton, const UsdStageRefPtr &stage, const SdfPath &skelRootPath)
 Save collision geometry as child prims under the skeleton.
CollisionGeometry momentum::loadCollisionGeometryFromUsd (const UsdStageRefPtr &stage, const Skeleton &skeleton)
 Load collision geometry from child prims.
void momentum::saveLocatorsToUsd (const LocatorList &locators, const Skeleton &skeleton, const UsdStageRefPtr &stage, const SdfPath &skelRootPath)
 Save locators as child prims under the skeleton.
LocatorList momentum::loadLocatorsFromUsd (const UsdStageRefPtr &stage, const Skeleton &skeleton)
 Load locators from child prims.

Function Documentation

◆ TF_DEFINE_PRIVATE_TOKENS()

PXR_NAMESPACE_USING_DIRECTIVE TF_DEFINE_PRIVATE_TOKENS ( _tokens ,
(Collision)(Locators)((momentumType, "momentum:type"))((momentumParent, "momentum:parent"))((momentumLength, "momentum:length"))((momentumRadius, "momentum:radius"))((momentumRadii, "momentum:radii"))((momentumHalfExtents, "momentum:halfExtents"))((momentumTranslation, "momentum:translation"))((momentumRotation, "momentum:rotation"))((momentumName, "momentum:name"))((momentumOffset, "momentum:offset"))((momentumWeight, "momentum:weight"))((momentumLocked, "momentum:locked"))((momentumLimitOrigin, "momentum:limitOrigin"))((momentumLimitWeight, "momentum:limitWeight"))((momentumAttachedToSkin, "momentum:attachedToSkin"))((momentumSkinOffset, "momentum:skinOffset"))  )