v5.0
入力リストに指定されている転送グループをすべて削除します。 転送グループの子は、その転送グループの親の子になります。 転送グループを削除しても子のグローバル位置は変更されません。
RemoveTransformGroup( [InputObjs] ); |
/*
This example will transform group a cone twice, making a hierarchy 3 objects deep.
Each object will be offset by 5 units in Y. Then the transform groups will both be
removed using RemoveTransformGroup Note the cone's position remains unchanged when
removing the groups.
*/
// Make transform groups visible in the camera view
SetValue("Camera.camvis.objctrltransfogroups", true, null);
// Create and position the cone
var oCone = CreatePrim("Cone", "MeshSurface");
var pos = XSIMath.CreateVector3();
pos.Set(0,5,0);
oCone.LocalTranslation = pos;
// Transform group the cone and offset the group 5 units in Y
var oXfmGroup = CreateTransformGroup(null, "cone");
oXfmGroup.LocalTranslation = pos;
var oXfmGroup2 = CreateTransformGroup(null, "cone");
oXfmGroup2.LocalTranslation = pos;
var oGroupColl = new ActiveXObject("XSI.Collection");
oGroupColl.Add(oXfmGroup);
oGroupColl.Add(oXfmGroup2);
RemoveTransformGroup( oGroupColl ); |