Update svn properties, minor formatting cleanup.

This commit is contained in:
Jeff Ames
2008-12-30 01:08:07 +00:00
parent 3a6b27befb
commit 2be0f7a6f0
22 changed files with 1950 additions and 1809 deletions

View File

@@ -1,55 +1,55 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenSim.Framework;
using OpenMetaverse;
namespace OpenSim.Region.Physics.Manager
{
public enum PhysicsJointType : int
{
Ball = 0,
Hinge = 1
}
public class PhysicsJoint
{
public virtual bool IsInPhysicsEngine { get { return false; } } // set internally to indicate if this joint has already been passed to the physics engine or is still pending
public PhysicsJointType Type;
public string RawParams;
public List<string> BodyNames = new List<string>();
public PhysicsVector Position; // global coords
public Quaternion Rotation; // global coords
public string ObjectNameInScene; // proxy object in scene that represents the joint position/orientation
public string TrackedBodyName; // body name that this joint is attached to (ObjectNameInScene will follow TrackedBodyName)
public Quaternion LocalRotation; // joint orientation relative to one of the involved bodies, the tracked body
public int ErrorMessageCount; // total # of error messages printed for this joint since its creation. if too many, further error messages are suppressed to prevent flooding.
public const int maxErrorMessages = 100; // no more than this # of error messages will be printed for each joint
}
}
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenSim.Framework;
using OpenMetaverse;
namespace OpenSim.Region.Physics.Manager
{
public enum PhysicsJointType : int
{
Ball = 0,
Hinge = 1
}
public class PhysicsJoint
{
public virtual bool IsInPhysicsEngine { get { return false; } } // set internally to indicate if this joint has already been passed to the physics engine or is still pending
public PhysicsJointType Type;
public string RawParams;
public List<string> BodyNames = new List<string>();
public PhysicsVector Position; // global coords
public Quaternion Rotation; // global coords
public string ObjectNameInScene; // proxy object in scene that represents the joint position/orientation
public string TrackedBodyName; // body name that this joint is attached to (ObjectNameInScene will follow TrackedBodyName)
public Quaternion LocalRotation; // joint orientation relative to one of the involved bodies, the tracked body
public int ErrorMessageCount; // total # of error messages printed for this joint since its creation. if too many, further error messages are suppressed to prevent flooding.
public const int maxErrorMessages = 100; // no more than this # of error messages will be printed for each joint
}
}

View File

@@ -1,49 +1,49 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
using Ode.NET;
using OpenSim.Framework;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.OdePlugin;
namespace OpenSim.Region.Physics.OdePlugin
{
class OdePhysicsJoint : PhysicsJoint
{
public override bool IsInPhysicsEngine
{
get
{
return (jointID != IntPtr.Zero);
}
}
public IntPtr jointID;
}
}
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
using Ode.NET;
using OpenSim.Framework;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Physics.OdePlugin;
namespace OpenSim.Region.Physics.OdePlugin
{
class OdePhysicsJoint : PhysicsJoint
{
public override bool IsInPhysicsEngine
{
get
{
return (jointID != IntPtr.Zero);
}
}
public IntPtr jointID;
}
}

View File

@@ -1366,28 +1366,28 @@ namespace OpenSim.Region.Physics.OdePlugin
get { return m_NINJA_physics_joints_enabled; }
}
// internal utility function: must be called within a lock(OdeLock)
// internal utility function: must be called within a lock (OdeLock)
private void InternalAddActiveJoint(PhysicsJoint joint)
{
activeJoints.Add(joint);
SOPName_to_activeJoint.Add(joint.ObjectNameInScene, joint);
}
// internal utility function: must be called within a lock(OdeLock)
// internal utility function: must be called within a lock (OdeLock)
private void InternalAddPendingJoint(OdePhysicsJoint joint)
{
pendingJoints.Add(joint);
SOPName_to_pendingJoint.Add(joint.ObjectNameInScene, joint);
}
// internal utility function: must be called within a lock(OdeLock)
// internal utility function: must be called within a lock (OdeLock)
private void InternalRemovePendingJoint(PhysicsJoint joint)
{
pendingJoints.Remove(joint);
SOPName_to_pendingJoint.Remove(joint.ObjectNameInScene);
}
// internal utility function: must be called within a lock(OdeLock)
// internal utility function: must be called within a lock (OdeLock)
private void InternalRemoveActiveJoint(PhysicsJoint joint)
{
activeJoints.Remove(joint);
@@ -1640,7 +1640,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
// normally called from within OnJointMoved, which is called from within a lock(OdeLock)
// normally called from within OnJointMoved, which is called from within a lock (OdeLock)
public override PhysicsVector GetJointAnchor(PhysicsJoint joint)
{
Debug.Assert(joint.IsInPhysicsEngine);
@@ -1666,7 +1666,7 @@ namespace OpenSim.Region.Physics.OdePlugin
return new PhysicsVector(pos.X, pos.Y, pos.Z);
}
// normally called from within OnJointMoved, which is called from within a lock(OdeLock)
// normally called from within OnJointMoved, which is called from within a lock (OdeLock)
// WARNING: ODE sometimes returns <0,0,0> as the joint axis! Therefore this function
// appears to be unreliable. Fortunately we can compute the joint axis ourselves by
// keeping track of the joint's original orientation relative to one of the involved bodies.
@@ -2230,8 +2230,8 @@ namespace OpenSim.Region.Physics.OdePlugin
if (SupportsNINJAJoints)
{
DeleteRequestedJoints(); // this must be outside of the lock(OdeLock) to avoid deadlocks
CreateRequestedJoints(); // this must be outside of the lock(OdeLock) to avoid deadlocks
DeleteRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
}
lock (OdeLock)