OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
/// <summary>
/// Change prim in response to a link taint.
/// </summary>
Change prim in response to a link taint.
Change prim in response to a link taint .
private void changelink()
        {
            if (_parent == null && m_taintparent != null)
            {
                if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim)
                {
                    OdePrim obj = (OdePrim)m_taintparent;
                    obj.AddChildPrim(this);
                }
            }
            else if (_parent != null && m_taintparent == null)
            {
                if (_parent is OdePrim)
                {
                    OdePrim obj = (OdePrim)_parent;
                    obj.ChildDelink(this);
                    childPrim = false;
                }
            }
            _parent = m_taintparent;
            m_taintPhysics = IsPhysical;
        }
private void changelink ( ) { if ( _parent == null && m_taintparent != null ) { if ( m_taintparent . PhysicsActorType == ( int ) ActorTypes . Prim ) { OdePrim obj = ( OdePrim ) m_taintparent ; obj . AddChildPrim ( this ) ; } } else if ( _parent != null && m_taintparent == null ) { if ( _parent is OdePrim ) { OdePrim obj = ( OdePrim ) _parent ; obj . ChildDelink ( this ) ; childPrim = false ; } } _parent = m_taintparent ; m_taintPhysics = IsPhysical ; }
Change prim in response to a link taint.
Change prim in response to a link taint .
// If the newly set parent is not null // create link //obj.disableBody(); //Console.WriteLine("changelink calls ParentPrim"); /*
                    if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body)
                    {
                        _linkJointGroup = d.JointGroupCreate(0);
                        m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup);
                        d.JointAttach(m_linkJoint, obj.Body, Body);
                        d.JointSetFixed(m_linkJoint);
                    }
                     */ // If the newly set parent is null // destroy link //Console.WriteLine("  changelink B"); //_parent = null; /*
                    if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0)
                    d.JointGroupDestroy(_linkJointGroup);

                    _linkJointGroup = (IntPtr)0;
                    m_linkJoint = (IntPtr)0;
                */