24#ifndef PXR_USD_PCP_TYPES_H
25#define PXR_USD_PCP_TYPES_H
28#include "pxr/usd/pcp/api.h"
29#include "pxr/usd/pcp/site.h"
31#include "pxr/base/tf/pxrTslRobinMap/robin_set.h"
38PXR_NAMESPACE_OPEN_SCOPE
69 PcpRangeTypeReference,
71 PcpRangeTypeSpecialize,
77 PcpRangeTypeWeakerThanRoot,
81 PcpRangeTypeStrongerThanPayload,
91 return (arcType == PcpArcTypeInherit);
99 return (arcType == PcpArcTypeSpecialize);
131struct Pcp_SdSiteRef {
133 layer(layer_), path(path_)
138 bool operator==(
const Pcp_SdSiteRef& other)
const
140 return layer == other.layer && path == other.path;
143 bool operator!=(
const Pcp_SdSiteRef& other)
const
145 return !(*
this == other);
148 bool operator<(
const Pcp_SdSiteRef& other)
const
150 return layer < other.layer ||
151 (!(other.layer < layer) && path < other.path);
154 bool operator<=(
const Pcp_SdSiteRef& other)
const
156 return !(other < *
this);
159 bool operator>(
const Pcp_SdSiteRef& other)
const
161 return other < *
this;
164 bool operator>=(
const Pcp_SdSiteRef& other)
const
166 return !(*
this < other);
176struct Pcp_CompressedSdSite {
177 Pcp_CompressedSdSite(
size_t nodeIndex_,
size_t layerIndex_) :
178 nodeIndex(static_cast<uint16_t>(nodeIndex_)),
179 layerIndex(static_cast<uint16_t>(layerIndex_))
181 TF_VERIFY(nodeIndex_ < (
size_t(1) << 16));
182 TF_VERIFY(layerIndex_ < (
size_t(1) << 16));
189typedef std::vector<Pcp_CompressedSdSite> Pcp_CompressedSdSiteVector;
220PXR_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.
constexpr size_t PCP_INVALID_INDEX
A value which indicates an invalid index.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.
std::map< std::string, std::vector< std::string > > PcpVariantFallbackMap
typedef std::map<std::string, std::vector<std::string>> PcpVariantFallbackMap
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.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
bool PcpIsInheritArc(PcpArcType arcType)
Returns true if arcType represents an inherit arc, false otherwise.
Used to keep track of which sites have been visited and through what type of arcs.