Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
usd_skeleton_io.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
13
14#include <pxr/usd/usd/stage.h>
15#include <pxr/usd/usdSkel/skeleton.h>
16
17PXR_NAMESPACE_USING_DIRECTIVE
18
19namespace momentum {
20
25std::vector<std::string> buildHierarchicalPaths(const Skeleton& skeleton);
26
28Skeleton loadSkeletonFromUsd(const UsdStageRefPtr& stage);
29
31void saveSkeletonToUsd(const Skeleton& skeleton, UsdSkelSkeleton& skelPrim);
32
35 const CollisionGeometry& collision,
36 const Skeleton& skeleton,
37 const UsdStageRefPtr& stage,
38 const SdfPath& skelRootPath);
39
42 const UsdStageRefPtr& stage,
43 const Skeleton& skeleton);
44
47 const LocatorList& locators,
48 const Skeleton& skeleton,
49 const UsdStageRefPtr& stage,
50 const SdfPath& skelRootPath);
51
53LocatorList loadLocatorsFromUsd(const UsdStageRefPtr& stage, const Skeleton& skeleton);
54
55} // namespace momentum
Skeleton loadSkeletonFromUsd(const UsdStageRefPtr &stage)
Load a skeleton from a USD stage.
CollisionGeometryT< float > CollisionGeometry
SkeletonT< float > Skeleton
Definition fwd.h:263
void saveSkeletonToUsd(const Skeleton &skeleton, UsdSkelSkeleton &skelPrim)
Save a skeleton to a USD stage.
void saveCollisionGeometryToUsd(const CollisionGeometry &collision, const Skeleton &skeleton, const UsdStageRefPtr &stage, const SdfPath &skelRootPath)
Save collision geometry as child prims under the skeleton.
LocatorList loadLocatorsFromUsd(const UsdStageRefPtr &stage, const Skeleton &skeleton)
Load locators from child prims.
void saveLocatorsToUsd(const LocatorList &locators, const Skeleton &skeleton, const UsdStageRefPtr &stage, const SdfPath &skelRootPath)
Save locators as child prims under the skeleton.
CollisionGeometry loadCollisionGeometryFromUsd(const UsdStageRefPtr &stage, const Skeleton &skeleton)
Load collision geometry from child prims.
std::vector< std::string > buildHierarchicalPaths(const Skeleton &skeleton)
Build hierarchical joint paths from flat names and parent indices.
std::vector< Locator > LocatorList
A collection of locators attached to a skeleton.
Definition locator.h:79