// Remove a child from a linkset. // Returns a new linkset for the child which is a linkset of one (just the // orphened child). // Called at runtime. public BSLinkset RemoveMeFromLinkset(BSPrimLinkable child) { lock (m_linksetActivityLock) { if (IsRoot(child)) { // Cannot remove the root from a linkset. return(this); } RemoveChildFromLinkset(child); LinksetMass = ComputeLinksetMass(); } // The child is down to a linkset of just itself return(BSLinkset.Factory(PhysicsScene, child)); }
public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size, OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical, int material, float friction, float restitution, float gravityMultiplier, float density) : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical) { Linkset = BSLinkset.Factory(PhysicsScene, this); PhysicsScene.TaintedObject("BSPrimLinksetCompound.Refresh", delegate() { base.SetMaterial(material); base.Friction = friction; base.Restitution = restitution; base.GravityMultiplier = gravityMultiplier; base.Density = density; Linkset.Refresh(this); }); }