diff options
author | Robert Adams | 2012-11-29 09:53:59 -0800 |
---|---|---|
committer | Robert Adams | 2012-11-29 09:53:59 -0800 |
commit | 0bda35e18fdba53998d752b7ce7ef5b0580a642e (patch) | |
tree | 09826bcd9a8820753dd46de1ddff8f999da525f3 | |
parent | BulletSim: add expanded call to IMesher/Meshmerizer which enables/disables me... (diff) | |
download | opensim-SC-0bda35e18fdba53998d752b7ce7ef5b0580a642e.zip opensim-SC-0bda35e18fdba53998d752b7ce7ef5b0580a642e.tar.gz opensim-SC-0bda35e18fdba53998d752b7ce7ef5b0580a642e.tar.bz2 opensim-SC-0bda35e18fdba53998d752b7ce7ef5b0580a642e.tar.xz |
BulletSim: add copyright header where it is missing. Remove some unnecessary 'using' requirements so testing framework is less complicated.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 2 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | 32 |
2 files changed, 31 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index a398b74..fcee1de 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -45,9 +45,7 @@ using System; | |||
45 | using System.Collections.Generic; | 45 | using System.Collections.Generic; |
46 | using System.Reflection; | 46 | using System.Reflection; |
47 | using System.Runtime.InteropServices; | 47 | using System.Runtime.InteropServices; |
48 | using log4net; | ||
49 | using OpenMetaverse; | 48 | using OpenMetaverse; |
50 | using OpenSim.Framework; | ||
51 | using OpenSim.Region.Physics.Manager; | 49 | using OpenSim.Region.Physics.Manager; |
52 | 50 | ||
53 | namespace OpenSim.Region.Physics.BulletSPlugin | 51 | namespace OpenSim.Region.Physics.BulletSPlugin |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs index e91bfa8..eca1452 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | |||
@@ -1,3 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
1 | using System; | 28 | using System; |
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | using System.Text; | 30 | using System.Text; |
@@ -8,7 +35,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
8 | public abstract class BSMotor | 35 | public abstract class BSMotor |
9 | { | 36 | { |
10 | // Timescales and other things can be turned off by setting them to 'infinite'. | 37 | // Timescales and other things can be turned off by setting them to 'infinite'. |
11 | public const float Infinite = 10000f; | 38 | public const float Infinite = 12345f; |
12 | public readonly static Vector3 InfiniteVector = new Vector3(BSMotor.Infinite, BSMotor.Infinite, BSMotor.Infinite); | 39 | public readonly static Vector3 InfiniteVector = new Vector3(BSMotor.Infinite, BSMotor.Infinite, BSMotor.Infinite); |
13 | 40 | ||
14 | public BSMotor(string useName) | 41 | public BSMotor(string useName) |
@@ -19,7 +46,9 @@ public abstract class BSMotor | |||
19 | public virtual void Reset() { } | 46 | public virtual void Reset() { } |
20 | public virtual void Zero() { } | 47 | public virtual void Zero() { } |
21 | 48 | ||
49 | // A name passed at motor creation for easily identifyable debugging messages. | ||
22 | public string UseName { get; private set; } | 50 | public string UseName { get; private set; } |
51 | |||
23 | // Used only for outputting debug information. Might not be set so check for null. | 52 | // Used only for outputting debug information. Might not be set so check for null. |
24 | public BSScene PhysicsScene { get; set; } | 53 | public BSScene PhysicsScene { get; set; } |
25 | protected void MDetailLog(string msg, params Object[] parms) | 54 | protected void MDetailLog(string msg, params Object[] parms) |
@@ -99,6 +128,7 @@ public class BSVMotor : BSMotor | |||
99 | if (FrictionTimescale != BSMotor.InfiniteVector) | 128 | if (FrictionTimescale != BSMotor.InfiniteVector) |
100 | { | 129 | { |
101 | // frictionFactor = (Vector3.One / FrictionTimescale) * timeStep; | 130 | // frictionFactor = (Vector3.One / FrictionTimescale) * timeStep; |
131 | // Individual friction components can be 'infinite' so compute each separately. | ||
102 | frictionFactor.X = FrictionTimescale.X == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.X) * timeStep; | 132 | frictionFactor.X = FrictionTimescale.X == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.X) * timeStep; |
103 | frictionFactor.Y = FrictionTimescale.Y == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.Y) * timeStep; | 133 | frictionFactor.Y = FrictionTimescale.Y == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.Y) * timeStep; |
104 | frictionFactor.Z = FrictionTimescale.Z == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.Z) * timeStep; | 134 | frictionFactor.Z = FrictionTimescale.Z == BSMotor.Infinite ? 0f : (1f / FrictionTimescale.Z) * timeStep; |