示例#1
0
        internal void Disable(AuroraODEPrim parent)
        {
            if (!m_enabled)
                return;
            m_enabled = false;

            parent.SetMaterial((int)m_previousMaterial); //Revert to the original

            parent.ThrottleUpdates = true;
            //d.BodyDisable(Body);
            m_linearMotorDirection = Vector3.Zero;
            m_linearMotorDirectionLASTSET = Vector3.Zero;
            m_angularMotorDirection = Vector3.Zero;
        }
示例#2
0
        }//end SetDefaultsForType

        internal void Enable(IntPtr pBody, AuroraODEPrim parent, AuroraODEPhysicsScene pParentScene)
        {
            if (m_enabled)
                return;
            m_enabled = true;
            m_previousMaterial = (Material)parent.m_material;
            parent.SetMaterial((int)Material.Glass); //This seems to happen in SL... and its needed for here
            parent.ThrottleUpdates = false;
            m_body = pBody;
            if (pBody == IntPtr.Zero || m_type == Vehicle.TYPE_NONE)
                return;

            d.Mass mass;
            d.BodyGetMass(pBody, out mass);

            Mass = mass.mass;
            Mass *= 2;
        }