예제 #1
0
 public bool LinkPartToSOG(ISceneEntity grp, ISceneChildEntity part, int linkNum)
 {
     part.SetParentLocalId(grp.RootChild.LocalId);
     part.SetParent(grp);
     // Insert in terms of link numbers, the new links
     // before the current ones (with the exception of 
     // the root prim. Shuffle the old ones up
     foreach (ISceneChildEntity otherPart in grp.ChildrenEntities())
     {
         if (otherPart.LinkNum >= linkNum)
         {
             // Don't update root prim link number
             otherPart.LinkNum += 1;
         }
     }
     part.LinkNum = linkNum;
     return LinkPartToEntity(grp, part);
 }