HDK
|
#include "pxr/pxr.h"
#include "pxr/usd/usdGeom/api.h"
#include "pxr/base/gf/vec3f.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/tf/type.h"
Go to the source code of this file.
Typedefs | |
using | UsdGeomComputeExtentFunction = bool(*)(const UsdGeomBoundable &, const UsdTimeCode &, const GfMatrix4d *, VtVec3fArray *) |
Functions | |
template<class PrimType > | |
void | UsdGeomRegisterComputeExtentFunction (const UsdGeomComputeExtentFunction &fn) |
USDGEOM_API void | UsdGeomRegisterComputeExtentFunction (const TfType &boundableType, const UsdGeomComputeExtentFunction &fn) |
using UsdGeomComputeExtentFunction = bool(*)(const UsdGeomBoundable&, const UsdTimeCode&, const GfMatrix4d*, VtVec3fArray*) |
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 55 of file boundableComputeExtent.h.
|
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:
Plugins must also note that this function is implemented for a prim type in that type's schema definition. For example:
This allows the plugin system to discover this function dynamically and load the plugin if needed.
Definition at line 91 of file boundableComputeExtent.h.
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.