|
|
| |||
|
|
| |||
|
| ||||
| |||||
#include "vg.h" // Required for the standard Vega classes
void // # // # Public function // # // # This function restructures the passed pfSwitch node so that // # the node that the MultiGen loader inserts _MgSwitchGroup // # underneath a switch node is removed, this removes the // # the Creator masking node. This means that the switch will // # behave as expected when using pfSwitchVal for the child nodes, // # // # That is switch to the N'th child rather than to the N'th mask // # // # See MultiGen-Paradigm Creator online help for more information on masks // # // #####################################################################
// // Sanity check we need a pointer // if(swNode ){
// // No need really if only one or no children // if( pfGetNumChildren( swNode ) < 2){
pfGroup *mgGroup = (pfGroup *)pfGetChild( swNode, 0 );
// // Detatch the group from the Switch // pfRemoveChild( swNode, mgGroup );
// // Attach each child of the detached group to the switch // int num = pfGetNumChildren( mgGroup );
for( int child = 0; child < num ; child++ ){
pfAddChild( swNode, pfGetChild( mgGroup, child ));
}
// // Delete the MultiGen loader group // pfUnrefDelete( mgGroup );
}
} // restructureSwitch
| ||
© Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |