aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2013-02-07 21:05:58 +0000
committerMelanie2013-02-07 21:05:58 +0000
commit9089757ea2cabe49f40de64b7e6befa13a4553c1 (patch)
treed7ea386cb6dba9d3cdd94ef096287157dddc10c7
parentAdd plumbing for physics properties to get to the physics engine. (diff)
downloadopensim-SC_OLD-9089757ea2cabe49f40de64b7e6befa13a4553c1.zip
opensim-SC_OLD-9089757ea2cabe49f40de64b7e6befa13a4553c1.tar.gz
opensim-SC_OLD-9089757ea2cabe49f40de64b7e6befa13a4553c1.tar.bz2
opensim-SC_OLD-9089757ea2cabe49f40de64b7e6befa13a4553c1.tar.xz
Revert "Add plumbing for physics properties to get to the physics engine."
This reverts commit c658fa1c0dd83f23c66ccfedb12e8ab02ff01d0a.
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs56
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs5
2 files changed, 6 insertions, 55 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a3c7ed3..b00f388 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1387,46 +1387,10 @@ namespace OpenSim.Region.Framework.Scenes
1387 } 1387 }
1388 } 1388 }
1389 1389
1390 private float m_density = 10f; 1390 public float Density { get; set; }
1391 public float Density { 1391 public float GravityModifier { get; set; }
1392 get { return m_density; } 1392 public float Friction { get; set; }
1393 set 1393 public float Restitution { get; set; }
1394 {
1395 m_density = value;
1396 if (PhysActor != null)
1397 PhysActor.Density = m_density;
1398 }
1399 }
1400 private float m_gravityModifier = 1f;
1401 public float GravityModifier {
1402 get { return m_gravityModifier; }
1403 set
1404 {
1405 m_gravityModifier = value;
1406 if (PhysActor != null)
1407 PhysActor.GravityModifier = m_gravityModifier;
1408 }
1409 }
1410 private float m_friction = 0.5f;
1411 public float Friction {
1412 get { return m_friction; }
1413 set
1414 {
1415 m_friction = value;
1416 if (PhysActor != null)
1417 PhysActor.Friction = m_friction;
1418 }
1419 }
1420 private float m_restitution = 0f;
1421 public float Restitution {
1422 get { return m_restitution; }
1423 set
1424 {
1425 m_restitution = value;
1426 if (PhysActor != null)
1427 PhysActor.Restitution = m_restitution;
1428 }
1429 }
1430 1394
1431 #endregion Public Properties with only Get 1395 #endregion Public Properties with only Get
1432 1396
@@ -1932,18 +1896,8 @@ namespace OpenSim.Region.Framework.Scenes
1932 { 1896 {
1933 ParentGroup.Scene.AddPhysicalPrim(1); 1897 ParentGroup.Scene.AddPhysicalPrim(1);
1934 1898
1935 // Update initial values for various physical properties
1936 pa.SetMaterial(Material);
1937 pa.Density = Density;
1938 pa.Friction = Friction;
1939 pa.Restitution = Restitution;
1940 pa.GravityModifier = GravityModifier;
1941
1942 // Link up callbacks for property updates from the physics engine
1943 pa.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1899 pa.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1944 pa.OnOutOfBounds += PhysicsOutOfBounds; 1900 pa.OnOutOfBounds += PhysicsOutOfBounds;
1945
1946 // If this is a child prim, tell the physics engine about the parent
1947 if (ParentID != 0 && ParentID != LocalId) 1901 if (ParentID != 0 && ParentID != LocalId)
1948 { 1902 {
1949 PhysicsActor parentPa = ParentGroup.RootPart.PhysActor; 1903 PhysicsActor parentPa = ParentGroup.RootPart.PhysActor;
@@ -4108,6 +4062,7 @@ namespace OpenSim.Region.Framework.Scenes
4108 4062
4109 if (pa != null) 4063 if (pa != null)
4110 { 4064 {
4065 pa.SetMaterial(Material);
4111 DoPhysicsPropertyUpdate(UsePhysics, true); 4066 DoPhysicsPropertyUpdate(UsePhysics, true);
4112 4067
4113 if ( 4068 if (
@@ -4220,6 +4175,7 @@ namespace OpenSim.Region.Framework.Scenes
4220 if (pa != null) 4175 if (pa != null)
4221 { 4176 {
4222 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info 4177 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info
4178 pa.SetMaterial(Material);
4223 DoPhysicsPropertyUpdate(rigidBody, true); 4179 DoPhysicsPropertyUpdate(rigidBody, true);
4224 } 4180 }
4225 4181
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 4820ca4..d119791 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -235,11 +235,6 @@ namespace OpenSim.Region.Physics.Manager
235 public abstract float Mass { get; } 235 public abstract float Mass { get; }
236 public abstract Vector3 Force { get; set; } 236 public abstract Vector3 Force { get; set; }
237 237
238 public virtual float Density { get; set; }
239 public virtual float Friction { get; set; }
240 public virtual float Restitution { get; set; }
241 public virtual float GravityModifier { get; set; }
242
243 public abstract int VehicleType { get; set; } 238 public abstract int VehicleType { get; set; }
244 public abstract void VehicleFloatParam(int param, float value); 239 public abstract void VehicleFloatParam(int param, float value);
245 public abstract void VehicleVectorParam(int param, Vector3 value); 240 public abstract void VehicleVectorParam(int param, Vector3 value);