aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index a50905b..a2fbf41 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -33,7 +33,7 @@
33 * ODEDynamics.cs contains methods dealing with Prim Physical motion 33 * ODEDynamics.cs contains methods dealing with Prim Physical motion
34 * (dynamics) and the associated settings. Old Linear and angular 34 * (dynamics) and the associated settings. Old Linear and angular
35 * motors for dynamic motion have been replace with MoveLinear() 35 * motors for dynamic motion have been replace with MoveLinear()
36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic 36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic
37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to 37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
38 * switch between 'VEHICLE' parameter use and general dynamics 38 * switch between 'VEHICLE' parameter use and general dynamics
39 * settings use. 39 * settings use.
@@ -107,7 +107,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
107 private float m_targetHoverHeight; 107 private float m_targetHoverHeight;
108 private float m_groundHeight; 108 private float m_groundHeight;
109 private float m_waterHeight; 109 private float m_waterHeight;
110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
111 111
112 private int body_autodisable_frames; 112 private int body_autodisable_frames;
113 public int bodydisablecontrol = 0; 113 public int bodydisablecontrol = 0;
@@ -143,7 +143,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
143 143
144 private UUID? m_assetID; 144 private UUID? m_assetID;
145 private MeshState m_meshState; 145 private MeshState m_meshState;
146 146
147 public ODEScene _parent_scene; 147 public ODEScene _parent_scene;
148 148
149 /// <summary> 149 /// <summary>
@@ -888,7 +888,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
888 888
889 m_lastVelocity = _velocity; 889 m_lastVelocity = _velocity;
890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
891 m_vehicle.Stop(); 891 m_vehicle.Stop();
892 892
893 if(Body != IntPtr.Zero) 893 if(Body != IntPtr.Zero)
894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
@@ -980,7 +980,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
980 { 980 {
981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z); 981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z);
982 AddChange(changes.AngLock, axislock); 982 AddChange(changes.AngLock, axislock);
983 983
984 } 984 }
985 985
986 public override void SubscribeEvents(int ms) 986 public override void SubscribeEvents(int ms)
@@ -1464,7 +1464,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1464 IntPtr vertices, indices; 1464 IntPtr vertices, indices;
1465 int vertexCount, indexCount; 1465 int vertexCount, indexCount;
1466 int vertexStride, triStride; 1466 int vertexStride, triStride;
1467 1467
1468 IMesh mesh = m_mesh; 1468 IMesh mesh = m_mesh;
1469 1469
1470 if (mesh == null) 1470 if (mesh == null)
@@ -1529,7 +1529,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1529 m_OBB = _size * 0.5f; 1529 m_OBB = _size * 0.5f;
1530 m_physCost = 0.1f; 1530 m_physCost = 0.1f;
1531 m_streamCost = 1.0f; 1531 m_streamCost = 1.0f;
1532 1532
1533 _parent_scene.mesher.ReleaseMesh(mesh); 1533 _parent_scene.mesher.ReleaseMesh(mesh);
1534 m_meshState = MeshState.MeshFailed; 1534 m_meshState = MeshState.MeshFailed;
1535 m_mesh = null; 1535 m_mesh = null;
@@ -1830,7 +1830,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1830 if (childrenPrim.Count == 0) 1830 if (childrenPrim.Count == 0)
1831 { 1831 {
1832 collide_geom = prim_geom; 1832 collide_geom = prim_geom;
1833 m_targetSpace = _parent_scene.ActiveSpace; 1833 m_targetSpace = _parent_scene.ActiveSpace;
1834 } 1834 }
1835 else 1835 else
1836 { 1836 {
@@ -1911,7 +1911,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z); 1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
1912 _zeroFlag = false; 1912 _zeroFlag = false;
1913 bodydisablecontrol = 0; 1913 bodydisablecontrol = 0;
1914 } 1914 }
1915 _parent_scene.addActiveGroups(this); 1915 _parent_scene.addActiveGroups(this);
1916 } 1916 }
1917 1917
@@ -2011,7 +2011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2011 d.Matrix3 mat = new d.Matrix3(); 2011 d.Matrix3 mat = new d.Matrix3();
2012 d.Quaternion quat = new d.Quaternion(); 2012 d.Quaternion quat = new d.Quaternion();
2013 2013
2014 d.Mass tmpdmass = new d.Mass { }; 2014 d.Mass tmpdmass = new d.Mass { };
2015 d.Mass objdmass = new d.Mass { }; 2015 d.Mass objdmass = new d.Mass { };
2016 2016
2017 d.BodyGetMass(Body, out tmpdmass); 2017 d.BodyGetMass(Body, out tmpdmass);
@@ -2039,7 +2039,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2039 // subtract current prim inertia from object 2039 // subtract current prim inertia from object
2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass); 2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass);
2041 2041
2042 // back prim own inertia 2042 // back prim own inertia
2043 tmpdmass = primdMass; 2043 tmpdmass = primdMass;
2044 2044
2045 // update to new position and orientation 2045 // update to new position and orientation
@@ -2444,7 +2444,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2444 MakeBody(); 2444 MakeBody();
2445 } 2445 }
2446 2446
2447 2447
2448 #region changes 2448 #region changes
2449 2449
2450 private void changeadd() 2450 private void changeadd()
@@ -3011,7 +3011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3011 3011
3012 primVolume = repData.volume; 3012 primVolume = repData.volume;
3013 3013
3014 CreateGeom(); 3014 CreateGeom();
3015 3015
3016 if (prim_geom != IntPtr.Zero) 3016 if (prim_geom != IntPtr.Zero)
3017 { 3017 {
@@ -3145,7 +3145,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3145 3145
3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); 3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
3147 } 3147 }
3148 //resetCollisionAccounting(); 3148 //resetCollisionAccounting();
3149 } 3149 }
3150 _velocity = newVel; 3150 _velocity = newVel;
3151 } 3151 }
@@ -3171,7 +3171,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3171 3171
3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z); 3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z);
3173 } 3173 }
3174 //resetCollisionAccounting(); 3174 //resetCollisionAccounting();
3175 } 3175 }
3176 m_rotationalVelocity = newAngVel; 3176 m_rotationalVelocity = newAngVel;
3177 } 3177 }
@@ -3316,7 +3316,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3316 // let vehicles sleep 3316 // let vehicles sleep
3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
3318 return; 3318 return;
3319 3319
3320 if (++bodydisablecontrol < 50) 3320 if (++bodydisablecontrol < 50)
3321 return; 3321 return;
3322 3322
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3414 break; 3414 break;
3415 } // end switch (m_PIDHoverType) 3415 } // end switch (m_PIDHoverType)
3416 3416
3417 // don't go underground unless volumedetector 3417 // don't go underground unless volumedetector
3418 3418
3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect) 3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect)
3420 { 3420 {
@@ -3526,7 +3526,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3526 3526
3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it 3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it
3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere 3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere
3530 m_lastposition = _position; 3530 m_lastposition = _position;
3531 m_lastorientation = _orientation; 3531 m_lastorientation = _orientation;
3532 3532
@@ -3635,7 +3635,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3635 _orientation.X = ori.X; 3635 _orientation.X = ori.X;
3636 _orientation.Y = ori.Y; 3636 _orientation.Y = ori.Y;
3637 _orientation.Z = ori.Z; 3637 _orientation.Z = ori.Z;
3638 _orientation.W = ori.W; 3638 _orientation.W = ori.W;
3639 } 3639 }
3640 3640
3641 // update velocities and aceleration 3641 // update velocities and aceleration