Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
usd_mesh_io.cpp File Reference
#include "momentum/io/usd/usd_mesh_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/vec3f.h>
#include <pxr/base/gf/vec4f.h>
#include <pxr/base/vt/array.h>
#include <pxr/usd/sdf/valueTypeName.h>
#include <pxr/usd/usd/primRange.h>
#include <pxr/usd/usdGeom/primvarsAPI.h>
#include <pxr/usd/usdGeom/tokens.h>
#include <pxr/usd/usdSkel/bindingAPI.h>
#include <pxr/usd/usdSkel/blendShape.h>
#include <algorithm>
#include <array>
#include <string>
#include <unordered_set>

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

PXR_NAMESPACE_USING_DIRECTIVE TF_DEFINE_PRIVATE_TOKENS (_tokens,(displayColor)(Cd)(color)(vertexColor)(diffuseColor)((momentumConfidence, "momentum:confidence"))((momentumBlendShapeName, "momentum:blendShapeName")))
Mesh momentum::loadMeshFromUsd (const UsdStageRefPtr &stage)
 Load a mesh from a USD stage.
SkinWeights momentum::loadSkinWeightsFromUsd (const UsdStageRefPtr &stage, size_t numVertices)
 Load skin weights from a USD stage.
void momentum::saveMeshToUsd (const Mesh &mesh, UsdGeomMesh &meshPrim)
 Save a mesh to a USD stage.
void momentum::saveSkinWeightsToUsd (const SkinWeights &skinWeights, UsdGeomMesh &meshPrim, const UsdSkelSkeleton &skelPrim)
 Save skin weights to a USD stage.
void momentum::saveBlendShapesToUsd (const BlendShape &blendShape, UsdGeomMesh &meshPrim)
 Save blend shapes to a USD stage.
std::shared_ptr< BlendShape > momentum::loadBlendShapesFromUsd (const UsdStageRefPtr &stage, size_t numVertices)
 Load blend shapes from a USD stage.

Function Documentation

◆ TF_DEFINE_PRIVATE_TOKENS()

PXR_NAMESPACE_USING_DIRECTIVE TF_DEFINE_PRIVATE_TOKENS ( _tokens ,
(displayColor)(Cd)(color)(vertexColor)(diffuseColor)((momentumConfidence, "momentum:confidence"))((momentumBlendShapeName, "momentum:blendShapeName"))  )