aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs52
1 files changed, 51 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 7cabddd..e3f88c6 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -115,6 +115,7 @@ namespace OpenSim.Region.Physics.OdePlugin
115 115
116 private int body_autodisable_frames; 116 private int body_autodisable_frames;
117 public int bodydisablecontrol; 117 public int bodydisablecontrol;
118 private float m_gravmod = 1.0f;
118 119
119 120
120 // Default we're a Geometry 121 // Default we're a Geometry
@@ -914,6 +915,55 @@ namespace OpenSim.Region.Physics.OdePlugin
914 bounce = _parent_scene.m_materialContactsData[pMaterial].bounce; 915 bounce = _parent_scene.m_materialContactsData[pMaterial].bounce;
915 } 916 }
916 917
918 public override float Density
919 {
920 get
921 {
922 return m_density * 100f;
923 }
924 set
925 {
926 m_density = value / 100f;
927 // for not prim mass is not updated since this implies full rebuild of body inertia TODO
928 }
929 }
930 public override float GravModifier
931 {
932 get
933 {
934 return m_gravmod;
935 }
936 set
937 {
938 m_gravmod = value;
939 if (m_vehicle != null)
940 m_vehicle.GravMod = m_gravmod;
941 }
942 }
943 public override float Friction
944 {
945 get
946 {
947 return mu;
948 }
949 set
950 {
951 mu = value;
952 }
953 }
954
955 public override float Restitution
956 {
957 get
958 {
959 return bounce;
960 }
961 set
962 {
963 bounce = value;
964 }
965 }
966
917 public void setPrimForRemoval() 967 public void setPrimForRemoval()
918 { 968 {
919 AddChange(changes.Remove, null); 969 AddChange(changes.Remove, null);
@@ -3336,7 +3386,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3336 } 3386 }
3337 else 3387 else
3338 { 3388 {
3339 float b = (1.0f - m_buoyancy); 3389 float b = (1.0f - m_buoyancy) * m_gravmod;
3340 fx = _parent_scene.gravityx * b; 3390 fx = _parent_scene.gravityx * b;
3341 fy = _parent_scene.gravityy * b; 3391 fy = _parent_scene.gravityy * b;
3342 fz = _parent_scene.gravityz * b; 3392 fz = _parent_scene.gravityz * b;