Loading...
Searching...
No Matches
boundableComputeExtent.h File Reference
+ Include dependency graph for boundableComputeExtent.h:

Go to the source code of this file.

Typedefs

using UsdGeomComputeExtentFunction
 Function registered with UsdGeomRegisterComputeExtentFunction for computing extents for a Boundable prim at the given time and filling the given VtVec3fArray with the result.
 

Functions

template<class PrimType >
void UsdGeomRegisterComputeExtentFunction (const UsdGeomComputeExtentFunction &fn)
 Registers fn as the function to use for computing extents for Boundable prims of type PrimType by UsdGeomBoundable::ComputeExtentFromPlugins.
 
USDGEOM_API void UsdGeomRegisterComputeExtentFunction (const TfType &boundableType, const UsdGeomComputeExtentFunction &fn)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Typedef Documentation

◆ UsdGeomComputeExtentFunction

Initial value:
bool(*)(const UsdGeomBoundable&,
const UsdTimeCode&,
const GfMatrix4d*,
VtVec3fArray*)
Stores a 4x4 matrix of double elements.
Definition matrix4d.h:71
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition boundable.h:66
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition timeCode.h:72

Function registered with UsdGeomRegisterComputeExtentFunction for computing extents for a Boundable prim at the given time and filling the given VtVec3fArray with the result.

If an optional transform matrix is supplied, the extent is computed as if the object was first transformed by the matrix. If the transform matrix is nullptr, the extent is computed as if the identity matrix was passed.

The Boundable is guaranteed to be convertible to the prim type this function was registered with. The function must be thread-safe.
It should return true on success, false on failure.

Definition at line 35 of file boundableComputeExtent.h.

Function Documentation

◆ UsdGeomRegisterComputeExtentFunction() [1/2]

USDGEOM_API void UsdGeomRegisterComputeExtentFunction ( const TfType & boundableType,
const UsdGeomComputeExtentFunction & fn )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ UsdGeomRegisterComputeExtentFunction() [2/2]

template<class PrimType >
void UsdGeomRegisterComputeExtentFunction ( const UsdGeomComputeExtentFunction & fn)
inline

Registers fn as the function to use for computing extents for Boundable prims of type PrimType by UsdGeomBoundable::ComputeExtentFromPlugins.

PrimType must derive from UsdGeomBoundable.

Plugins should generally call this function in a TF_REGISTRY_FUNCTION. For example:

{
}
void UsdGeomRegisterComputeExtentFunction(const UsdGeomComputeExtentFunction &fn)
Registers fn as the function to use for computing extents for Boundable prims of type PrimType by Usd...
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

Plugins must also note that this function is implemented for a prim type in that type's schema definition. For example:

class "MyPrim" (
...
customData = {
dictionary extraPlugInfo = {
bool implementsComputeExtent = true
}
}
...
)
{ ... }

This allows the plugin system to discover this function dynamically and load the plugin if needed.

Definition at line 74 of file boundableComputeExtent.h.