diff options
author | Dahlia Trimble | 2008-07-24 07:45:58 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-07-24 07:45:58 +0000 |
commit | f74a9bcdc7b0682c1c205e9d640fbfa5f214840b (patch) | |
tree | 6d30a6964db7d79771a4ec7b655077b813f983b3 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |
parent | Refactor some tests. (diff) | |
download | opensim-SC_OLD-f74a9bcdc7b0682c1c205e9d640fbfa5f214840b.zip opensim-SC_OLD-f74a9bcdc7b0682c1c205e9d640fbfa5f214840b.tar.gz opensim-SC_OLD-f74a9bcdc7b0682c1c205e9d640fbfa5f214840b.tar.bz2 opensim-SC_OLD-f74a9bcdc7b0682c1c205e9d640fbfa5f214840b.tar.xz |
Implements llSetForce() and llGetForce(). These are experimental and the units may not match the Linden implementation.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 59655d7..a4c0d79 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -103,6 +103,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
103 | private CollisionLocker ode; | 103 | private CollisionLocker ode; |
104 | 104 | ||
105 | private bool m_taintforce = false; | 105 | private bool m_taintforce = false; |
106 | private PhysicsVector m_force = new PhysicsVector(0.0f, 0.0f, 0.0f); | ||
106 | private List<PhysicsVector> m_forcelist = new List<PhysicsVector>(); | 107 | private List<PhysicsVector> m_forcelist = new List<PhysicsVector>(); |
107 | 108 | ||
108 | private IMesh _mesh; | 109 | private IMesh _mesh; |
@@ -749,7 +750,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
749 | changeshape(timestep); | 750 | changeshape(timestep); |
750 | // | 751 | // |
751 | 752 | ||
752 | if (m_taintforce) | 753 | if (m_taintforce || m_force != new PhysicsVector(0.0f, 0.0f, 0.0f)) |
753 | changeAddForce(timestep); | 754 | changeAddForce(timestep); |
754 | 755 | ||
755 | if (m_taintdisable) | 756 | if (m_taintdisable) |
@@ -1751,7 +1752,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1751 | //m_log.Info("[PHYSICS]: dequeing forcelist"); | 1752 | //m_log.Info("[PHYSICS]: dequeing forcelist"); |
1752 | if (IsPhysical) | 1753 | if (IsPhysical) |
1753 | { | 1754 | { |
1754 | PhysicsVector iforce = new PhysicsVector(); | 1755 | //PhysicsVector iforce = new PhysicsVector(); |
1756 | PhysicsVector iforce = m_force * 100.0f; | ||
1755 | for (int i = 0; i < m_forcelist.Count; i++) | 1757 | for (int i = 0; i < m_forcelist.Count; i++) |
1756 | { | 1758 | { |
1757 | iforce = iforce + (m_forcelist[i] * 100); | 1759 | iforce = iforce + (m_forcelist[i] * 100); |
@@ -1856,7 +1858,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1856 | 1858 | ||
1857 | public override PhysicsVector Force | 1859 | public override PhysicsVector Force |
1858 | { | 1860 | { |
1859 | get { return PhysicsVector.Zero; } | 1861 | //get { return PhysicsVector.Zero; } |
1862 | get { return m_force; } | ||
1863 | set { m_force = value; } | ||
1860 | } | 1864 | } |
1861 | 1865 | ||
1862 | public override PhysicsVector CenterOfMass | 1866 | public override PhysicsVector CenterOfMass |