![]() |
|
Computation registrations initiate the process of defining computations. More...
Collaboration diagram for Computation Registrations:Functions | |
| EXEC_API Exec_PrimComputationBuilder | PrimComputation (const TfToken &computationName) |
Registers a prim computation named computationName. | |
| EXEC_API Exec_AttributeComputationBuilder | AttributeComputation (const TfToken &attributeName, const TfToken &computationName) |
Registers an attribute computation named computationName on attributes named attributeName. | |
| template<class... DispatchedOntoSchemaTypes> | |
| Exec_PrimComputationBuilder | DispatchedPrimComputation (const TfToken &computationName, DispatchedOntoSchemaTypes &&...schemaTypes) |
Registers a dispatched prim computation named computationName. | |
| EXEC_API Exec_PrimComputationBuilder | DispatchedPrimComputation (const TfToken &computationName, ExecDispatchesOntoSchemas &&ontoSchemas) |
| template<class... DispatchedOntoSchemaTypes> | |
| Exec_AttributeComputationBuilder | DispatchedAttributeComputation (const TfToken &computationName, DispatchedOntoSchemaTypes &&...schemaTypes) |
Registers a dispatched attribute computation named computationName. | |
| EXEC_API Exec_AttributeComputationBuilder | DispatchedAttributeComputation (const TfToken &computationName, ExecDispatchesOntoSchemas &&ontoSchemas) |
| template<typename ResultType = _UnspecifiedType, typename ReturnType = _UnspecifiedType> | |
| Derived & | Callback (ReturnType(*callback)(const VdfContext &)) |
| Registers a callback function that implements the evaluation logic for a computation. | |
| template<typename... Args> | |
| Exec_PrimComputationBuilder & | Inputs (Args &&... args) |
| Takes one or more input registrations that specify how to source input values for a prim computation. | |
| template<typename... Args> | |
| Exec_AttributeComputationBuilder & | Inputs (Args &&... args) |
| Takes one or more input registrations that specify how to source input values for an attribute computation. | |
Computation registrations initiate the process of defining computations.
The object returned by a computation registration has methods that are used to specify the callback that implements the computation and the inputs that are provided to the callback at evaluation time.
| EXEC_API Exec_AttributeComputationBuilder AttributeComputation | ( | const TfToken & | attributeName, |
| const TfToken & | computationName | ||
| ) |
Registers an attribute computation named computationName on attributes named attributeName.
| Derived & Callback | ( | ReturnType(*)(const VdfContext &) | callback | ) |
Registers a callback function that implements the evaluation logic for a computation.
This registration must follow a computation registration.
Callback functions must be function pointers where the signature is ReturnType (*)(const VdfContext &) and ReturnType can be any of the following:
ResultType can be deduced from the callback type.ResultType must be explicitly specified as a template parameter.void in which case ResultType must be explicitly specified as a template parameter and the callback must call VdfContext::SetOutput to provide the output value.Definition at line 1655 of file computationBuilders.h.
| Exec_AttributeComputationBuilder DispatchedAttributeComputation | ( | const TfToken & | computationName, |
| DispatchedOntoSchemaTypes &&... | schemaTypes | ||
| ) |
Registers a dispatched attribute computation named computationName.
Definition at line 1759 of file computationBuilders.h.
| Exec_PrimComputationBuilder DispatchedPrimComputation | ( | const TfToken & | computationName, |
| DispatchedOntoSchemaTypes &&... | schemaTypes | ||
| ) |
Registers a dispatched prim computation named computationName.
A dispatched prim computation is only visible to computations on the prim that does the dispatching. I.e., the computation registrations for a schema can include dispatched computations and inputs to computations registered on the same schema can request the dispatched computations, using the input option FallsBackToDispatched(), from other provider prims and find them there. Other schema computation registrations will not be able to find the dispatched computations, however.
Dispatched computations can be restricted as to which prims they can dispatch onto, based on the typed and applied schemas of a given target prim. The second parameter to the DispatchedPrimComputation registration function can be used to specify zero or more schema types (as TfTypes). If any types are given, the dispatched computation will only be found on a target prim if that prim's typed schema type (or one of its base type) is among the given schema types or if the fully expanded list of API schemas applied to the prim includes a schema that is among the given schema types.
Definition at line 1744 of file computationBuilders.h.
| Exec_PrimComputationBuilder & Inputs | ( | Args &&... | args | ) |
Takes one or more input registrations that specify how to source input values for a prim computation.
This registration must follow a computation registration.
Definition at line 1706 of file computationBuilders.h.
| Exec_AttributeComputationBuilder & Inputs | ( | Args &&... | args | ) |
Takes one or more input registrations that specify how to source input values for an attribute computation.
This registration must follow a computation registration.
Definition at line 1725 of file computationBuilders.h.
| EXEC_API Exec_PrimComputationBuilder PrimComputation | ( | const TfToken & | computationName | ) |
Registers a prim computation named computationName.