OpenSim/Region/Physics/OdePlugin/OdeScene.cs
/// <summary>
/// Add a request for joint creation.
/// </summary>
/// <remarks>
/// this joint will just be added to a waiting list that is NOT processed during the main
/// Simulate() loop (to avoid deadlocks). After Simulate() is finished, we handle unprocessed joint requests.
/// </remarks>
/// <param name="objectNameInScene"></param>
/// <param name="jointType"></param>
/// <param name="position"></param>
/// <param name="rotation"></param>
/// <param name="parms"></param>
/// <param name="bodyNames"></param>
/// <param name="trackedBodyName"></param>
/// <param name="localRotation"></param>
/// <returns></returns>
Add a request for joint creation.
Add a request for joint creation .
public override PhysicsJoint RequestJointCreation(
            string objectNameInScene, PhysicsJointType jointType, Vector3 position,
            Quaternion rotation, string parms, List<string> bodyNames, string trackedBodyName, Quaternion localRotation)
        {
            OdePhysicsJoint joint = new OdePhysicsJoint();
            joint.ObjectNameInScene = objectNameInScene;
            joint.Type = jointType;
            joint.Position = position;
            joint.Rotation = rotation;
            joint.RawParams = parms;
            joint.BodyNames = new List<string>(bodyNames);
            joint.TrackedBodyName = trackedBodyName;
            joint.LocalRotation = localRotation;
            joint.jointID = IntPtr.Zero;
            joint.ErrorMessageCount = 0;
            lock (externalJointRequestsLock)
            {
                if (!requestedJointsToBeCreated.Contains(joint)) 
                {
                    requestedJointsToBeCreated.Add(joint);
                }
            }
            return joint;
        }
public override PhysicsJoint RequestJointCreation ( string objectNameInScene , PhysicsJointType jointType , Vector3 position , Quaternion rotation , string parms , List < string > bodyNames , string trackedBodyName , Quaternion localRotation ) { OdePhysicsJoint joint = new OdePhysicsJoint ( ) ; joint . ObjectNameInScene = objectNameInScene ; joint . Type = jointType ; joint . Position = position ; joint . Rotation = rotation ; joint . RawParams = parms ; joint . BodyNames = new List < string > ( bodyNames ) ; joint . TrackedBodyName = trackedBodyName ; joint . LocalRotation = localRotation ; joint . jointID = IntPtr . Zero ; joint . ErrorMessageCount = 0 ; lock ( externalJointRequestsLock ) { if ( ! requestedJointsToBeCreated . Contains ( joint ) ) { requestedJointsToBeCreated . Add ( joint ) ; } } return joint ; }
Add a request for joint creation.
Add a request for joint creation .
// forbid same creation request from entering twice 
None
objectNameInScene
string
None
jointType
PhysicsJointType
None
position
Vector3
None
rotation
Quaternion
None
parms
string
None
bodyNames
List<string>
None
trackedBodyName
string
None
localRotation
Quaternion
None
remarks
this joint will just be added to a waiting list that is NOT processed during the main
Simulate() loop (to avoid deadlocks). After Simulate() is finished, we handle unprocessed joint requests.
this joint will just be added to a waiting list that is NOT processed during the main Simulate () loop ( to avoid deadlocks ) . After Simulate () is finished we handle unprocessed joint requests .