mor.wrapper.replaceAndSave.MORreplace
- MORreplace(node, type, newParam, initialParam)[source]
Will replace classical ForceField by HyperReduced one
argument
type
definition
node
Sofa.node
On which node the current object will be set
type
undefined
Type of the Sofa.object
newParam
dic
Contains numerous argument to modify/replace some component of the SOFA scene.more details seeReductionParam
initialParam
dic
Contains all the initial argument of the SOFA component being instanciated
This function work thanks to the
stlib.scene.Wrapper
of the STLIB SOFA plugin that will call this function BEFORE creating any SOFA component enabling us to replace/modify the SOFA component before its creationThis function will also, if there is save in the newParam key, save the initial component type & argument into 2 global variable
myModel
&myMORModel
that will be used later bywriteGraphScene
to create a reusable component.We save our scene here with all the complications it will produce, wrong links (corrected by
modifyPath
), need to differentiate components from myModel that will be moved in myMORModel, ect… Because this way the component parameters are not polluted by all unnecessary dataFields that are initialized during creation.