All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PcpNodeRef Class Reference

PcpNode represents a node in an expression tree for compositing scene description. More...

Inherits totally_ordered< PcpNodeRef >.

Classes

struct  Hash
 Hash functor. More...
 

Public Types

typedef PcpNodeRef_ChildrenIterator child_const_iterator
 
typedef
PcpNodeRef_ChildrenReverseIterator 
child_const_reverse_iterator
 
typedef std::pair
< child_const_iterator,
child_const_iterator > 
child_const_range
 

Public Member Functions

Pcp_CompressedSdSite GetCompressedSdSite (size_t layerIndex) const
 
Arc information

Information pertaining to the arcs connecting this node to its parent and child nodes.

PCP_API PcpArcType GetArcType () const
 Returns the type of arc connecting this node to its parent node. More...
 
PCP_API PcpNodeRef GetParentNode () const
 Returns this node's immediate parent node. More...
 
PCP_API child_const_range GetChildrenRange () const
 Returns an iterator range over the children nodes in strongest to weakest order. More...
 
PCP_API PcpNodeRef InsertChild (const PcpLayerStackSite &site, const PcpArc &arc, PcpErrorBasePtr *error)
 Inserts a new child node for site, connected to this node via arc. More...
 
PCP_API PcpNodeRef InsertChildSubgraph (const PcpPrimIndex_GraphPtr &subgraph, const PcpArc &arc, PcpErrorBasePtr *error)
 Inserts subgraph as a child of this node, with the root node of subtree connected to this node via arc. More...
 
PCP_API PcpNodeRef GetOriginNode () const
 Returns the immediate origin node for this node. More...
 
PCP_API PcpNodeRef GetOriginRootNode () const
 Walk up to the root origin node for this node. More...
 
PCP_API PcpNodeRef GetRootNode () const
 Walk up to the root node of this expression. More...
 
PCP_API const PcpMapExpressionGetMapToParent () const
 Returns mapping function used to translate paths and values from this node to its parent node. More...
 
PCP_API const PcpMapExpressionGetMapToRoot () const
 Returns mapping function used to translate paths and values from this node directly to the root node. More...
 
PCP_API int GetSiblingNumAtOrigin () const
 Returns this node's index among siblings with the same arc type at this node's origin. More...
 
PCP_API int GetNamespaceDepth () const
 Returns the absolute namespace depth of the node that introduced this node. More...
 
PCP_API int GetDepthBelowIntroduction () const
 Return the number of levels of namespace this node's site is below the level at which it was introduced by an arc. More...
 
PCP_API SdfPath GetPathAtIntroduction () const
 Returns the path for this node's site when it was introduced. More...
 
PCP_API SdfPath GetIntroPath () const
 Get the path that introduced this node. More...
 
Node information

Information pertaining specifically to this node and the opinions that it may or may not provide.

PCP_API PcpLayerStackSite GetSite () const
 Get the site this node represents. More...
 
PCP_API const SdfPathGetPath () const
 Returns the path for the site this node represents. More...
 
PCP_API const PcpLayerStackRefPtr & GetLayerStack () const
 Returns the layer stack for the site this node represents. More...
 
PCP_API bool IsRootNode () const
 Returns true if this node is the root node of the prim index graph. More...
 
PCP_API bool IsDueToAncestor () const
 Returns true if this node is due to an ancestral opinion. More...
 
PCP_API void SetHasSymmetry (bool hasSymmetry)
 Get/set whether this node provides any symmetry opinions, either directly or from a namespace ancestor. More...
 
PCP_API bool HasSymmetry () const
 
PCP_API void SetPermission (SdfPermission perm)
 Get/set the permission for this node. More...
 
PCP_API SdfPermission GetPermission () const
 
PCP_API void SetInert (bool inert)
 Get/set whether this node is inert. More...
 
PCP_API bool IsInert () const
 
PCP_API void SetCulled (bool culled)
 Get/set whether this node is culled. More...
 
PCP_API bool IsCulled () const
 
PCP_API void SetRestricted (bool restricted)
 Get/set whether this node is restricted. More...
 
PCP_API bool IsRestricted () const
 
PCP_API bool CanContributeSpecs () const
 Returns true if this node is allowed to contribute opinions for composition, false otherwise. More...
 
PCP_API void SetHasSpecs (bool hasSpecs)
 Returns true if this node has opinions authored for composition, false otherwise. More...
 
PCP_API bool HasSpecs () const
 

Friends

class PcpNodeIterator
 

Operators / Miscellaneous

typedef size_t PcpNodeRef::* UnspecifiedBoolType
 Returns true if this is a valid node reference, false otherwise. More...
 
 operator UnspecifiedBoolType () const
 
bool operator== (const PcpNodeRef &rhs) const
 Returns true if this references the same node as rhs. More...
 
PCP_API bool operator< (const PcpNodeRef &rhs) const
 Returns true if this node is 'less' than rhs. More...
 
PcpPrimIndex_GraphPtr GetOwningGraph () const
 Returns the graph that this node belongs to. More...
 
PCP_API void * GetUniqueIdentifier () const
 Returns a value that uniquely identifies this node. More...
 

Detailed Description

PcpNode represents a node in an expression tree for compositing scene description.

A node represents the opinions from a particular site. In addition, it may have child nodes, representing nested expressions that are composited over/under this node.

Child nodes are stored and composited in strength order.

Each node holds information about the arc to its parent. This captures both the relative strength of the sub-expression as well as any value-mapping needed, such as to rename opinions from a model to use in a particular instance.

Definition at line 67 of file node.h.

Member Typedef Documentation

typedef size_t PcpNodeRef::* UnspecifiedBoolType

Returns true if this is a valid node reference, false otherwise.

Definition at line 82 of file node.h.

Member Function Documentation

PCP_API bool CanContributeSpecs ( ) const

Returns true if this node is allowed to contribute opinions for composition, false otherwise.

PCP_API PcpArcType GetArcType ( ) const

Returns the type of arc connecting this node to its parent node.

PCP_API child_const_range GetChildrenRange ( ) const

Returns an iterator range over the children nodes in strongest to weakest order.

PCP_API int GetDepthBelowIntroduction ( ) const

Return the number of levels of namespace this node's site is below the level at which it was introduced by an arc.

PCP_API SdfPath GetIntroPath ( ) const

Get the path that introduced this node.

Specifically, this is the path the parent node had at the level of namespace where this node was added as a child. For a root node, this returns the absolute root path. See also GetDepthBelowIntroduction().

PCP_API const PcpLayerStackRefPtr& GetLayerStack ( ) const

Returns the layer stack for the site this node represents.

PCP_API const PcpMapExpression& GetMapToParent ( ) const

Returns mapping function used to translate paths and values from this node to its parent node.

PCP_API const PcpMapExpression& GetMapToRoot ( ) const

Returns mapping function used to translate paths and values from this node directly to the root node.

PCP_API int GetNamespaceDepth ( ) const

Returns the absolute namespace depth of the node that introduced this node.

Note that this does not count any variant selections.

PCP_API PcpNodeRef GetOriginNode ( ) const

Returns the immediate origin node for this node.

The origin node is the node that caused this node to be brought into the prim index. In most cases, this is the same as the parent node. For implied inherits, the origin is the node from which this node was propagated.

PCP_API PcpNodeRef GetOriginRootNode ( ) const

Walk up to the root origin node for this node.

This is the very first node that caused this node to be added to the graph. For instance, the root origin node of an implied inherit is the original inherit node.

PcpPrimIndex_GraphPtr GetOwningGraph ( ) const

Returns the graph that this node belongs to.

PCP_API PcpNodeRef GetParentNode ( ) const

Returns this node's immediate parent node.

Will return NULL if this node is a root node.

PCP_API const SdfPath& GetPath ( ) const

Returns the path for the site this node represents.

PCP_API SdfPath GetPathAtIntroduction ( ) const

Returns the path for this node's site when it was introduced.

PCP_API PcpNodeRef GetRootNode ( ) const

Walk up to the root node of this expression.

PCP_API int GetSiblingNumAtOrigin ( ) const

Returns this node's index among siblings with the same arc type at this node's origin.

PCP_API PcpLayerStackSite GetSite ( ) const

Get the site this node represents.

PCP_API void* GetUniqueIdentifier ( ) const

Returns a value that uniquely identifies this node.

PCP_API PcpNodeRef InsertChild ( const PcpLayerStackSite site,
const PcpArc arc,
PcpErrorBasePtr *  error 
)

Inserts a new child node for site, connected to this node via arc.

PCP_API PcpNodeRef InsertChildSubgraph ( const PcpPrimIndex_GraphPtr &  subgraph,
const PcpArc arc,
PcpErrorBasePtr *  error 
)

Inserts subgraph as a child of this node, with the root node of subtree connected to this node via arc.

PCP_API bool IsDueToAncestor ( ) const

Returns true if this node is due to an ancestral opinion.

PCP_API bool IsRootNode ( ) const

Returns true if this node is the root node of the prim index graph.

PCP_API bool operator< ( const PcpNodeRef rhs) const

Returns true if this node is 'less' than rhs.

The ordering of nodes is arbitrary and does not indicate the relative strength of the nodes.

bool operator== ( const PcpNodeRef rhs) const
inline

Returns true if this references the same node as rhs.

Definition at line 88 of file node.h.

PCP_API void SetCulled ( bool  culled)

Get/set whether this node is culled.

If a node is culled, it and all descendant nodes provide no opinions to the index. A culled node is also considered inert.

PCP_API void SetHasSpecs ( bool  hasSpecs)

Returns true if this node has opinions authored for composition, false otherwise.

PCP_API void SetHasSymmetry ( bool  hasSymmetry)

Get/set whether this node provides any symmetry opinions, either directly or from a namespace ancestor.

PCP_API void SetInert ( bool  inert)

Get/set whether this node is inert.

An inert node never provides any opinions to a prim index. Such a node may exist purely as a marker to represent certain composition structure, but should never contribute opinions.

PCP_API void SetPermission ( SdfPermission  perm)

Get/set the permission for this node.

This indicates whether specs on this node can be accessed from other nodes.

PCP_API void SetRestricted ( bool  restricted)

Get/set whether this node is restricted.

A restricted node is a node that cannot contribute opinions to the index due to permissions.


The documentation for this class was generated from the following file: