aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorJeff Ames2008-05-01 14:31:30 +0000
committerJeff Ames2008-05-01 14:31:30 +0000
commitd51ce47b2d7635b17f3dd429158e8f59b78b83aa (patch)
treed3595bd5194199184059aa398b91a51dc6c799cf /OpenSim/Region/Physics
parent* Looks like I had the bamboo build right in the first place - it was just th... (diff)
downloadopensim-SC-d51ce47b2d7635b17f3dd429158e8f59b78b83aa.zip
opensim-SC-d51ce47b2d7635b17f3dd429158e8f59b78b83aa.tar.gz
opensim-SC-d51ce47b2d7635b17f3dd429158e8f59b78b83aa.tar.bz2
opensim-SC-d51ce47b2d7635b17f3dd429158e8f59b78b83aa.tar.xz
Update svn properties. Minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs30
1 files changed, 9 insertions, 21 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index cf2e694..58dbd63 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -112,7 +112,6 @@ namespace OpenSim.Region.Physics.OdePlugin
112 private PhysicsActor _parent = null; 112 private PhysicsActor _parent = null;
113 private PhysicsActor m_taintparent = null; 113 private PhysicsActor m_taintparent = null;
114 114
115
116 private bool iscolliding = false; 115 private bool iscolliding = false;
117 private bool m_isphysical = false; 116 private bool m_isphysical = false;
118 private bool m_isSelected = false; 117 private bool m_isSelected = false;
@@ -129,7 +128,6 @@ namespace OpenSim.Region.Physics.OdePlugin
129 public bool outofBounds = false; 128 public bool outofBounds = false;
130 private float m_density = 10.000006836f; // Aluminum g/cm3; 129 private float m_density = 10.000006836f; // Aluminum g/cm3;
131 130
132
133 public bool _zeroFlag = false; 131 public bool _zeroFlag = false;
134 private bool m_lastUpdateSent = false; 132 private bool m_lastUpdateSent = false;
135 133
@@ -1761,8 +1759,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1761 1759
1762 public override bool Flying 1760 public override bool Flying
1763 { 1761 {
1764 get { return false; //no flying prims for you 1762 // no flying prims for you
1765 } 1763 get { return false; }
1766 set { } 1764 set { }
1767 } 1765 }
1768 1766
@@ -1832,8 +1830,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1832 1830
1833 public override PrimitiveBaseShape Shape 1831 public override PrimitiveBaseShape Shape
1834 { 1832 {
1835 set { 1833 set
1836 1834 {
1837 _pbs = value; 1835 _pbs = value;
1838 m_taintshape = true; 1836 m_taintshape = true;
1839 } 1837 }
@@ -1851,13 +1849,12 @@ namespace OpenSim.Region.Physics.OdePlugin
1851 returnVelocity.Z = (m_lastVelocity.Z + _velocity.Z)/2; 1849 returnVelocity.Z = (m_lastVelocity.Z + _velocity.Z)/2;
1852 return returnVelocity; 1850 return returnVelocity;
1853 } 1851 }
1854 set { 1852 set
1853 {
1855 _velocity = value; 1854 _velocity = value;
1856 1855
1857 m_taintVelocity = value; 1856 m_taintVelocity = value;
1858 _parent_scene.AddPhysicsActorTaint(this); 1857 _parent_scene.AddPhysicsActorTaint(this);
1859
1860
1861 } 1858 }
1862 } 1859 }
1863 1860
@@ -1898,7 +1895,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1898 1895
1899 public override PhysicsVector RotationalVelocity 1896 public override PhysicsVector RotationalVelocity
1900 { 1897 {
1901 get { 1898 get
1899 {
1902 PhysicsVector pv = new PhysicsVector(0, 0, 0); 1900 PhysicsVector pv = new PhysicsVector(0, 0, 0);
1903 if (_zeroFlag) 1901 if (_zeroFlag)
1904 return pv; 1902 return pv;
@@ -1911,6 +1909,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1911 } 1909 }
1912 set { m_rotationalVelocity = value; } 1910 set { m_rotationalVelocity = value; }
1913 } 1911 }
1912
1914 public override void CrossingFailure() 1913 public override void CrossingFailure()
1915 { 1914 {
1916 m_crossingfailures++; 1915 m_crossingfailures++;
@@ -1918,7 +1917,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1918 { 1917 {
1919 base.RaiseOutOfBounds(_position); 1918 base.RaiseOutOfBounds(_position);
1920 return; 1919 return;
1921
1922 } 1920 }
1923 else if (m_crossingfailures == 5) 1921 else if (m_crossingfailures == 5)
1924 { 1922 {
@@ -1942,7 +1940,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1942 m_taintparent = null; 1940 m_taintparent = null;
1943 } 1941 }
1944 1942
1945
1946 public override void LockAngularMotion(PhysicsVector axis) 1943 public override void LockAngularMotion(PhysicsVector axis)
1947 { 1944 {
1948 // reverse the zero/non zero values for ODE. 1945 // reverse the zero/non zero values for ODE.
@@ -1958,7 +1955,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1958 // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! 1955 // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit!
1959 if (_parent != null) 1956 if (_parent != null)
1960 { 1957 {
1961
1962 } 1958 }
1963 else 1959 else
1964 { 1960 {
@@ -1973,7 +1969,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1973 1969
1974 PhysicsVector l_position = new PhysicsVector(); 1970 PhysicsVector l_position = new PhysicsVector();
1975 1971
1976
1977 // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!) 1972 // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!)
1978 //if (vec.X < 0.0f) { vec.X = 0.0f; if (Body != (IntPtr)0) d.BodySetAngularVel(Body, 0, 0, 0); } 1973 //if (vec.X < 0.0f) { vec.X = 0.0f; if (Body != (IntPtr)0) d.BodySetAngularVel(Body, 0, 0, 0); }
1979 //if (vec.Y < 0.0f) { vec.Y = 0.0f; if (Body != (IntPtr)0) d.BodySetAngularVel(Body, 0, 0, 0); } 1974 //if (vec.Y < 0.0f) { vec.Y = 0.0f; if (Body != (IntPtr)0) d.BodySetAngularVel(Body, 0, 0, 0); }
@@ -2014,7 +2009,6 @@ namespace OpenSim.Region.Physics.OdePlugin
2014 // Disables the prim's movement physics.... 2009 // Disables the prim's movement physics....
2015 // It's a hack and will generate a console message if it fails. 2010 // It's a hack and will generate a console message if it fails.
2016 2011
2017
2018 //IsPhysical = false; 2012 //IsPhysical = false;
2019 if (_parent == null) 2013 if (_parent == null)
2020 base.RaiseOutOfBounds(_position); 2014 base.RaiseOutOfBounds(_position);
@@ -2052,10 +2046,8 @@ namespace OpenSim.Region.Physics.OdePlugin
2052 _zeroFlag = false; 2046 _zeroFlag = false;
2053 } 2047 }
2054 2048
2055
2056 if (_zeroFlag) 2049 if (_zeroFlag)
2057 { 2050 {
2058
2059 _velocity.X = 0.0f; 2051 _velocity.X = 0.0f;
2060 _velocity.Y = 0.0f; 2052 _velocity.Y = 0.0f;
2061 _velocity.Z = 0.0f; 2053 _velocity.Z = 0.0f;
@@ -2197,8 +2189,6 @@ namespace OpenSim.Region.Physics.OdePlugin
2197 d.JointAttach(Amotor, Body, IntPtr.Zero); 2189 d.JointAttach(Amotor, Body, IntPtr.Zero);
2198 d.JointSetAMotorMode(Amotor, dAMotorEuler); 2190 d.JointSetAMotorMode(Amotor, dAMotorEuler);
2199 2191
2200
2201
2202 d.JointSetAMotorNumAxes(Amotor,(int)axisnum); 2192 d.JointSetAMotorNumAxes(Amotor,(int)axisnum);
2203 int i = 0; 2193 int i = 0;
2204 2194
@@ -2235,11 +2225,9 @@ namespace OpenSim.Region.Physics.OdePlugin
2235 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); 2225 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f);
2236 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); 2226 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f);
2237 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); 2227 d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f);
2238
2239 2228
2240 d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); 2229 d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f);
2241 d.JointSetAMotorParam(Amotor, (int)dParam.FMax, m_tensor); 2230 d.JointSetAMotorParam(Amotor, (int)dParam.FMax, m_tensor);
2242
2243 } 2231 }
2244 } 2232 }
2245} 2233}