usdrt::UsdGeomBoundable
Defined in usdrt/scenegraph/usd/usdGeom/boundable.h
Functions
usdrt::PhysxSchemaPhysxParticleSystem::CreateExtentAttr: See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute's default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxParticleSystem::CreateProxyPrimRel: See GetProxyPrimRel() , and also Create vs Get Property Methods for when to use Get vs Create.
usdrt::PhysxSchemaPhysxParticleSystem::CreatePurposeAttr: See GetPurposeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute's default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxParticleSystem::CreateVisibilityAttr: See GetVisibilityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute's default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxParticleSystem::CreateXformOpOrderAttr: See GetXformOpOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute's default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::PhysxSchemaPhysxParticleSystem::GetExtentAttr: Extent is a three dimensional range measuring the geometric extent of the authored gprim in its own local space (i.e. its own transform not applied), without accounting for any shader-induced displacement. If any extent value has been authored for a given Boundable, then it should be authored at every timeSample at which geometry-affecting properties are authored, to ensure correct evaluation via ComputeExtent(). If no extent value has been authored, then ComputeExtent() will call the Boundable's registered ComputeExtentFunction(), which may be expensive, which is why we strongly encourage proper authoring of extent.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::PhysxSchemaPhysxParticleSystem::GetProxyPrimRel: The proxyPrim relationship allows us to link a prim whose purpose is "render" to its (single target) purpose="proxy" prim. This is entirely optional, but can be useful in several scenarios:
usdrt::PhysxSchemaPhysxParticleSystem::GetPurposeAttr: Purpose is a classification of geometry into categories that can each be independently included or excluded from traversals of prims on a stage, such as rendering or bounding-box computation traversals.
usdrt::PhysxSchemaPhysxParticleSystem::GetVisibilityAttr: Visibility is meant to be the simplest form of "pruning" visibility that is supported by most DCC apps. Visibility is animatable, allowing a sub-tree of geometry to be present for some segment of a shot, and absent from others; unlike the action of deactivating geometry prims, invisible geometry is still available for inspection, for positioning, for defining volumes, etc.
usdrt::PhysxSchemaPhysxParticleSystem::GetXformOpOrderAttr: Encodes the sequence of transformation operations in the order in which they should be pushed onto a transform stack while visiting a UsdStage 's prims in a graph traversal that will effect the desired positioning for this prim and its descendant prims.
usdrt::UsdGeomBoundable::UsdGeomBoundable: Construct a UsdGeomBoundable on the prim held by
schemaObj
. Should be preferred over UsdGeomBoundable (schemaObj.GetPrim()), as it preserves SchemaBase state.usdrt::UsdGeomBoundable::UsdGeomBoundable: Construct a UsdGeomBoundable on UsdPrim
prim
. Equivalent to UsdGeomBoundable::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.usdrt::UsdGeomBoundable::operator bool: Boolean operator.
usdrt::UsdGeomBoundable::~UsdGeomBoundable: Destructor.
Variables
usdrt::UsdGeomBoundable::schemaType: Compile time constant representing what kind of schema this class is.
-
class UsdGeomBoundable : public usdrt::UsdGeomXformable
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space, extent.
Why Extent and not Bounds ?
Boundable introduces the notion of “extent”, which is a cached computation of a prim’s local-space 3D range for its resolved attributes at the layer and time in which extent is authored. We have found that with composed scene description, attempting to cache pre-computed bounds at interior prims in a scene graph is very fragile, given the ease with which one can author a single attribute in a stronger layer that can invalidate many authored caches - or with which a re-published, referenced asset can do the same.
Therefore, we limit to precomputing (generally) leaf-prim extent, which avoids the need to read in large point arrays to compute bounds, and provides UsdGeomBBoxCache the means to efficiently compute and (session-only) cache intermediate bounds. You are free to compute and author intermediate bounds into your scenes, of course, which may work well if you have sufficient locks on your pipeline to guarantee that once authored, the geometry and transforms upon which they are based will remain unchanged, or if accuracy of the bounds is not an ironclad requisite.
When intermediate bounds are authored on Boundable parents, the child prims will be pruned from BBox computation; the authored extent is expected to incorporate all child bounds.
Subclassed by usdrt::UsdGeomGprim, usdrt::UsdGeomPointInstancer, usdrt::UsdLuxBoundableLightBase, usdrt::UsdSkelRoot, usdrt::UsdSkelSkeleton
Public Functions
-
inline explicit UsdGeomBoundable(const UsdPrim &prim = UsdPrim())
Construct a UsdGeomBoundable on UsdPrim
prim
. Equivalent to UsdGeomBoundable::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.
-
inline explicit UsdGeomBoundable(const UsdSchemaBase &schemaObj)
Construct a UsdGeomBoundable on the prim held by
schemaObj
. Should be preferred over UsdGeomBoundable(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~UsdGeomBoundable()
Destructor.
-
inline operator bool() const
Boolean operator.
- Returns
Return true if the contained prim is an instance of this schema using
IsA
, and false otherwise.
-
inline UsdAttribute GetExtentAttr() const
Extent is a three dimensional range measuring the geometric extent of the authored gprim in its own local space (i.e. its own transform not applied), without accounting for any shader-induced displacement. If any extent value has been authored for a given Boundable, then it should be authored at every timeSample at which geometry-affecting properties are authored, to ensure correct evaluation via ComputeExtent(). If no extent value has been authored, then ComputeExtent() will call the Boundable’s registered ComputeExtentFunction(), which may be expensive, which is why we strongly encourage proper authoring of extent.
An authored extent on a prim which has children is expected to include the extent of all children, as they will be pruned from BBox computation during traversal.
See also
ComputeExtent()
See also
Why Extent and not Bounds ?.
Declaration
float3[] extent
C++ Type
VtArray<GfVec3f>
Usd Type
SdfValueTypeNames->Float3Array
-
inline UsdAttribute CreateExtentAttr() const
See GetExtentAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdAttribute GetXformOpOrderAttr() const
Encodes the sequence of transformation operations in the order in which they should be pushed onto a transform stack while visiting a UsdStage’s prims in a graph traversal that will effect the desired positioning for this prim and its descendant prims.
You should rarely, if ever, need to manipulate this attribute directly. It is managed by the AddXformOp(), SetResetXformStack(), and SetXformOpOrder(), and consulted by GetOrderedXformOps() and GetLocalTransformation().
Declaration
uniform token[] xformOpOrder
C++ Type
VtArray<TfToken>
Usd Type
SdfValueTypeNames->TokenArray
Variability
SdfVariabilityUniform
-
inline UsdAttribute CreateXformOpOrderAttr() const
See GetXformOpOrderAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdAttribute GetVisibilityAttr() const
Visibility is meant to be the simplest form of “pruning” visibility that is supported by most DCC apps. Visibility is animatable, allowing a sub-tree of geometry to be present for some segment of a shot, and absent from others; unlike the action of deactivating geometry prims, invisible geometry is still available for inspection, for positioning, for defining volumes, etc.
Declaration
token visibility = "inherited"
C++ Type
TfToken
Usd Type
SdfValueTypeNames->Token
Allowed Values
inherited, invisible
-
inline UsdAttribute CreateVisibilityAttr() const
See GetVisibilityAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdAttribute GetPurposeAttr() const
Purpose is a classification of geometry into categories that can each be independently included or excluded from traversals of prims on a stage, such as rendering or bounding-box computation traversals.
See UsdGeom_ImageablePurpose for more detail about how purpose is computed and used.
Declaration
uniform token purpose = "default"
C++ Type
TfToken
Usd Type
SdfValueTypeNames->Token
Variability
SdfVariabilityUniform
Allowed Values
default, render, proxy, guide
-
inline UsdAttribute CreatePurposeAttr() const
See GetPurposeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author
defaultValue
as the attribute’s default, sparsely (when it makes sense to do so) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdRelationship GetProxyPrimRel() const
The proxyPrim relationship allows us to link a prim whose purpose is “render” to its (single target) purpose=”proxy” prim. This is entirely optional, but can be useful in several scenarios:
In a pipeline that does pruning (for complexity management) by deactivating prims composed from asset references, when we deactivate a purpose=”render” prim, we will be able to discover and additionally deactivate its associated purpose=”proxy” prim, so that preview renders reflect the pruning accurately.
DCC importers may be able to make more aggressive optimizations for interactive processing and display if they can discover the proxy for a given render prim.
With a little more work, a Hydra-based application will be able to map a picked proxy prim back to its render geometry for selection.
Note
It is only valid to author the proxyPrim relationship on prims whose purpose is “render”.
-
inline UsdRelationship CreateProxyPrimRel() const
See GetProxyPrimRel(), and also Create vs Get Property Methods for when to use Get vs Create.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::AbstractTyped
Compile time constant representing what kind of schema this class is.
See also
UsdSchemaType
-
inline explicit UsdGeomBoundable(const UsdPrim &prim = UsdPrim())