This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
parseUtils.h
Go to the documentation of this file.
1//
2// Copyright 2024 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef USDPHYSICS_PARSE_UTILS_H
8#define USDPHYSICS_PARSE_UTILS_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usd/stage.h"
14#include "pxr/usd/usdGeom/xformCache.h"
15#include "pxr/usd/sdf/path.h"
16
17#include "pxr/usd/usdPhysics/api.h"
19
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23
24// -------------------------------------------------------------------------- //
25// PHYSICSPARSEUTILS //
26// -------------------------------------------------------------------------- //
27
28
38
40std::function<void(UsdPhysicsObjectType type,
41 TfSpan<const SdfPath> primPaths,
43 const VtValue& userData)>;
44
51{
53 std::vector<TfToken> jointTokens;
55 std::vector<TfToken> shapeTokens;
58 std::vector<TfToken> instancerTokens;
59};
60
94USDPHYSICS_API bool LoadUsdPhysicsFromRange(const UsdStageWeakPtr stage,
95 const std::vector<SdfPath>& includePaths,
96 UsdPhysicsReportFn reportFn,
97 const VtValue& userData,
98 const std::vector<SdfPath>* excludePaths = nullptr,
99 const CustomUsdPhysicsTokens* customPhysicsTokens = nullptr,
100 const std::vector<SdfPath>* simulationOwners = nullptr);
101
102
103PXR_NAMESPACE_CLOSE_SCOPE
104
105#endif
Represents a range of contiguous elements.
Definition: span.h:71
Physics object type structure for type enumeration.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
std::function< void(UsdPhysicsObjectType type, TfSpan< const SdfPath > primPaths, TfSpan< const UsdPhysicsObjectDesc > objectDescs, const VtValue &userData)> UsdPhysicsReportFn
UsdPhysicsReportFn - report function that reports parsed data in a batched manner.
Definition: parseUtils.h:43
std::vector< TfToken > jointTokens
Custom joints to be reported by parsing.
Definition: parseUtils.h:53
std::vector< TfToken > instancerTokens
Custom physics instancers, these make sure that the subhierarchy is skipped and expected to be parsed...
Definition: parseUtils.h:58
std::vector< TfToken > shapeTokens
Custom shapes to be reported by parsing.
Definition: parseUtils.h:55
USDPHYSICS_API bool LoadUsdPhysicsFromRange(const UsdStageWeakPtr stage, const std::vector< SdfPath > &includePaths, UsdPhysicsReportFn reportFn, const VtValue &userData, const std::vector< SdfPath > *excludePaths=nullptr, const CustomUsdPhysicsTokens *customPhysicsTokens=nullptr, const std::vector< SdfPath > *simulationOwners=nullptr)
Load USD physics from a given list of paths.
Token lists for custom physics objects that allow for custom physics objects to be reported by parsin...
Definition: parseUtils.h:51