7#ifndef PXR_USD_PCP_TYPES_H
8#define PXR_USD_PCP_TYPES_H
11#include "pxr/usd/pcp/api.h"
12#include "pxr/usd/pcp/site.h"
14#include "pxr/base/tf/pxrTslRobinMap/robin_set.h"
21PXR_NAMESPACE_OPEN_SCOPE
52 PcpRangeTypeReference,
54 PcpRangeTypeSpecialize,
60 PcpRangeTypeWeakerThanRoot,
64 PcpRangeTypeStrongerThanPayload,
74 return (arcType == PcpArcTypeInherit);
82 return (arcType == PcpArcTypeSpecialize);
114struct Pcp_SdSiteRef {
116 layer(layer_), path(path_)
121 bool operator==(
const Pcp_SdSiteRef& other)
const
123 return layer == other.layer && path == other.path;
126 bool operator!=(
const Pcp_SdSiteRef& other)
const
128 return !(*
this == other);
131 bool operator<(
const Pcp_SdSiteRef& other)
const
133 return layer < other.layer ||
134 (!(other.layer < layer) && path < other.path);
137 bool operator<=(
const Pcp_SdSiteRef& other)
const
139 return !(other < *
this);
142 bool operator>(
const Pcp_SdSiteRef& other)
const
144 return other < *
this;
147 bool operator>=(
const Pcp_SdSiteRef& other)
const
149 return !(*
this < other);
159struct Pcp_CompressedSdSite {
160 Pcp_CompressedSdSite(
size_t nodeIndex_,
size_t layerIndex_) :
161 nodeIndex(static_cast<uint16_t>(nodeIndex_)),
162 layerIndex(static_cast<uint16_t>(layerIndex_))
164 TF_VERIFY(nodeIndex_ < (
size_t(1) << 16));
165 TF_VERIFY(layerIndex_ < (
size_t(1) << 16));
172typedef std::vector<Pcp_CompressedSdSite> Pcp_CompressedSdSiteVector;
203PXR_NAMESPACE_CLOSE_SCOPE
A site specifies a path in a layer stack of scene description.
A path value used to locate objects in layers or scenegraphs.
Implementation of a hash set using open-addressing and the robin hood hashing algorithm with backward...
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.
std::map< std::string, std::vector< std::string > > PcpVariantFallbackMap
typedef std::map<std::string, std::vector<std::string>> PcpVariantFallbackMap
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.
bool PcpIsSpecializeArc(PcpArcType arcType)
Returns true if arcType represents a specialize arc, false otherwise.
bool PcpIsClassBasedArc(PcpArcType arcType)
Returns true if arcType represents a class-based composition arc, false otherwise.
bool PcpIsInheritArc(PcpArcType arcType)
Returns true if arcType represents an inherit arc, false otherwise.
constexpr size_t PCP_INVALID_INDEX
A value which indicates an invalid index.
Used to keep track of which sites have been visited and through what type of arcs.