Render Toolbox 3
v2.1
|
Plugins to modify the Collada parent scene on the fly. More...
Functions | |
remodelerFunction functionPath | GetRemodelerAPIFunction (functionName, hints) |
Find the function_handle of a RenderToolbox3 Remodeling API function. | |
docNode | RTB_AfterCondition_SampleRemodeler (docNode, mappings, varNames, varValues, conditionNumber, hints) |
Modify a Collada document once per condition, after applying mappings. | |
docNode | RTB_BeforeAll_SampleRemodeler (docNode, hints) |
Modify a Collada document once, before all other processing. | |
docNode | RTB_BeforeCondition_SampleRemodeler (docNode, mappings, varNames, varValues, conditionNumber, hints) |
Modify a Collada document once per condition, before applying mappings. | |
Plugins to modify the Collada parent scene on the fly.
These functions provide templates for Remodeler Plugin API functions. RenderToolbox3 can invoke a named remodeler plugin during scene file generation in order to modify the Collada parent scene on the fly, in Matlab.
remodelerFunction functionPath GetRemodelerAPIFunction | ( | functionName | , |
hints | |||
) |
Find the function_handle of a RenderToolbox3 Remodeling API function.
functionName | the name of a collada API function |
hints | struct of RenderToolbox3 options, see GetDefaultHints() |
Attempts to locate the named Remodeling API function that belongs to the named "remodeler", which is a set of remodeling functions. Remodeler API functions must on the Matlab path. They must have names that folow the pattern RTB_functionName_remodeler, for example RTB_BeforeAll_SampleRemodeler.
hints.remodeler may be the name of any set of user-defined remodeler functions, for exampole, "SampleRemodeler".
functionName must be the name of a RenderToolbox3 Remodeler API function:
Returns the function_handle of the RenderToolbox3 Remodeler API function, for the given hints.remodeler and functionName. If no such function is found, retuns an empty []. Also returns the full path to the named function, if found. Usage: [remodelerFunction, functionPath] = GetRemodelerAPIFunction(functionName, hints)
docNode RTB_AfterCondition_SampleRemodeler | ( | docNode | , |
mappings | , | ||
varNames | , | ||
varValues | , | ||
conditionNumber | , | ||
hints | |||
) |
Modify a Collada document once per condition, after applying mappings.
docNode | XML Collada document node Java object |
mappings | struct of mappings data from ParseMappings() |
varNames | cell array of conditions file variable names |
varValues | cell array of variable values for current condition |
conditionNumber | the number of the current condition |
hints | struct of RenderToolbox3 options |
This function is a template for a RenderToolbox3 "AfterCondition" remodeler function. A remodeler is a set of user-defined functions for modifying Collada parent scene documents.
By default, RenderToolbox3 does not invoke any remodeler. If the name of a remodeler is specified in the hints.remodeler argument passed to a function like MakeSceneFiles(), then RenderToolbox3 will automatically invoke the named remodeler during scene file generation.
The name of an AfterCondition function must match a specific pattern: it must begin with "RTB_AfterCondition_", and it must end with the name of a remodeler, for example "SampleRemodeler". This pattern allows RenderToolbox3 to automatically locate the AfterCondition function for a given remodeler. AfterCondition functions should be included in the Matlab path.
An AfterCondition function must accept as its first argument an XML document node Java object, as returned from ReadSceneDom(). This docNode will represent the entire Collada parent scene. It must accept as subsequent arguments: a struct of mappings data as returned from ParseMappings(), a cell array of variable names and variable values for the current condition, the number of the current condition, and a struct of RenderToolbox3 options as returned from GetDefaultHints().
An AfterCondition function may modify the XML document in any way, or not at all. It may use any of the given mappings, varNames, varValues, or conditionsNumber to make modifications that are specific to current condition. These modifications will be applied once per condition, after mappings are applied to the parent scene. Thus, these modifications may use the results of mappings processing, and will apply only to the current condition. An AfterCondition function has the "final say" about a Collada parent scene, just before the scene converted to a renderer-native by a Renderer ImportCollada function.
An AfterCondition function must return the given XML document node Java object, or a different XML document node Java object, if desired. Usage: docNode = RTB_AfterCondition_SampleRemodeler(docNode, mappings, varNames, varValues, conditionNumber, hints)
docNode RTB_BeforeAll_SampleRemodeler | ( | docNode | , |
hints | |||
) |
Modify a Collada document once, before all other processing.
docNode | XML Collada document node Java object |
hints | struct of RenderToolbox3 options |
This function is a template for a RenderToolbox3 "BeforeAll" remodeler function. A remodeler is a set of user-defined functions for modifying Collada parent scene documents.
By default, RenderToolbox3 does not invoke any remodeler. If the name of a remodeler is specified in the hints.remodeler argument passed to a function like MakeSceneFiles(), then RenderToolbox3 will automatically invoke the named remodeler during scene file generation.
The name of a BeforeAll function must match a specific pattern: it must begin with "RTB_BeforeAll_", and it must end with the name of a remodeler, for example "SampleRemodeler". This pattern allows RenderToolbox3 to automatically locate the BeforeAll function for a given remodeler. BeforeAll functions should be included in the Matlab path.
A BeforeAll function must accept as its first argument an XML document node Java object, as returned from ReadSceneDom(). This docNode will represent the entire Collada parent scene. It must accept as its second argument a struct of RenderToolbox3 options as returned from GetDefaultHints().
A BeforeAll function may modify the given XML document in any way, or not at all. These modifications will be applied once, before all other scene file processing, so they will affect all generated scene files.
A BeforeAll function must return the given XML document node Java object, or a different XML document node Java object, if desired. Usage: docNode = RTB_BeforeAll_SampleRemodeler(docNode, hints)
docNode RTB_BeforeCondition_SampleRemodeler | ( | docNode | , |
mappings | , | ||
varNames | , | ||
varValues | , | ||
conditionNumber | , | ||
hints | |||
) |
Modify a Collada document once per condition, before applying mappings.
docNode | XML Collada document node Java object |
mappings | struct of mappings data from ParseMappings() |
varNames | cell array of conditions file variable names |
varValues | cell array of variable values for current condition |
conditionNumber | the number of the current condition |
hints | struct of RenderToolbox3 options |
This function is a template for a RenderToolbox3 "BeforeCondition" remodeler function. A remodeler is a set of user-defined functions for modifying Collada parent scene documents.
By default, RenderToolbox3 does not invoke any remodeler. If the name of a remodeler is specified in the hints.remodeler argument passed to a function like MakeSceneFiles(), then RenderToolbox3 will automatically invoke the named remodeler during scene file generation.
The name of a BeforeCondition function must match a specific pattern: it must begin with "RTB_BeforeCondition_", and it must end with the name of a remodeler, for example "SampleRemodeler". This pattern allows RenderToolbox3 to automatically locate the BeforeCondition function for a given remodeler. BeforeCondition functions should be included in the Matlab path.
A BeforeCondition function must accept as its first argument an XML document node Java object, as returned from ReadSceneDom(). This docNode will represent the entire Collada parent scene. It must accept as subsequent arguments: a struct of mappings data as returned from ParseMappings(), a cell array of variable names and variable values for the current condition, the number of the current condition, and a struct of RenderToolbox3 options as returned from GetDefaultHints().
A BeforeCondition function may modify the XML document in any way, or not at all. It may use any of the given mappings, varNames, varValues, or conditionsNumber to make modifications that are specific to current condition. These modifications will be applied once per condition, before mappings are applied to the parent scene. Thus, these modifications may affect how mappings are processed, and will apply only to the current condition.
A BeforeCondition function must return the given XML document node Java object, or a different XML document node Java object, if desired. Usage: docNode = RTB_BeforeCondition_SampleRemodeler(docNode, mappings, varNames, varValues, conditionNumber, hints)