Exemple #1
0
        void ProcessContactParameters(URDFLinkContactInfo contactInfo, CollisionObject col)
        {
            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_LATERAL_FRICTION) != 0)
            {
                col.Friction = (contactInfo.m_lateralFriction);
            }
            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_RESTITUTION) != 0)
            {
                col.Restitution = (contactInfo.m_restitution);
            }

            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_ROLLING_FRICTION) != 0)
            {
                col.RollingFriction = (contactInfo.m_rollingFriction);
            }
            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_SPINNING_FRICTION) != 0)
            {
                col.SpinningFriction = (contactInfo.m_spinningFriction);
            }
            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_STIFFNESS_DAMPING) != 0)
            {
                col.SetContactStiffnessAndDamping(contactInfo.m_contactStiffness, contactInfo.m_contactDamping);
            }
            if ((contactInfo.m_flags & URDF_LinkContactFlags.URDF_CONTACT_HAS_FRICTION_ANCHOR) != 0)
            {
                col.CollisionFlags = (col.CollisionFlags | BulletSharp.CollisionFlags.HasFrictionAnchor);
            }
        }