diff options
author | Teravus Ovares | 2008-01-29 15:10:18 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-29 15:10:18 +0000 |
commit | c4687116adfdeb5de056000ef3d2dd47b8695339 (patch) | |
tree | 420ad4a29cd3f20ddf2f7b7922f17c547bd7aea9 /OpenSim/Region/Physics | |
parent | * Patch from Ansi (IBM) (diff) | |
download | opensim-SC_OLD-c4687116adfdeb5de056000ef3d2dd47b8695339.zip opensim-SC_OLD-c4687116adfdeb5de056000ef3d2dd47b8695339.tar.gz opensim-SC_OLD-c4687116adfdeb5de056000ef3d2dd47b8695339.tar.bz2 opensim-SC_OLD-c4687116adfdeb5de056000ef3d2dd47b8695339.tar.xz |
* Implemented grab and throw in ODE. It's a little strong still so toss gently at first to test the waters or you'll lose prim to the pit at the edge of the sim. Make sure the object is physical before trying to toss it or it'll just move to the new location.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 20 |
7 files changed, 100 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 636cf1a..ff157d7 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -224,6 +224,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
224 | set { return; } | 224 | set { return; } |
225 | } | 225 | } |
226 | 226 | ||
227 | public override bool Grabbed | ||
228 | { | ||
229 | set { return; } | ||
230 | } | ||
231 | |||
232 | public override bool Selected | ||
233 | { | ||
234 | set { return; } | ||
235 | } | ||
236 | |||
227 | public override bool IsPhysical | 237 | public override bool IsPhysical |
228 | { | 238 | { |
229 | get { return false; } | 239 | get { return false; } |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index deba5f6..f42fdf6 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -883,6 +883,16 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
883 | set { return; } | 883 | set { return; } |
884 | } | 884 | } |
885 | 885 | ||
886 | public override bool Grabbed | ||
887 | { | ||
888 | set { return; } | ||
889 | } | ||
890 | |||
891 | public override bool Selected | ||
892 | { | ||
893 | set { return; } | ||
894 | } | ||
895 | |||
886 | public virtual void SetAcceleration(PhysicsVector accel) | 896 | public virtual void SetAcceleration(PhysicsVector accel) |
887 | { | 897 | { |
888 | lock (BulletXScene.BulletXLock) | 898 | lock (BulletXScene.BulletXLock) |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index d393b62..f97b279 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -122,6 +122,10 @@ namespace OpenSim.Region.Physics.Manager | |||
122 | 122 | ||
123 | public abstract PrimitiveBaseShape Shape { set; } | 123 | public abstract PrimitiveBaseShape Shape { set; } |
124 | 124 | ||
125 | public abstract bool Grabbed { set; } | ||
126 | |||
127 | public abstract bool Selected { set; } | ||
128 | |||
125 | public virtual void RequestPhysicsterseUpdate() | 129 | public virtual void RequestPhysicsterseUpdate() |
126 | { | 130 | { |
127 | // Make a temporary copy of the event to avoid possibility of | 131 | // Make a temporary copy of the event to avoid possibility of |
@@ -190,6 +194,8 @@ namespace OpenSim.Region.Physics.Manager | |||
190 | public abstract void AddForce(PhysicsVector force); | 194 | public abstract void AddForce(PhysicsVector force); |
191 | 195 | ||
192 | public abstract void SetMomentum(PhysicsVector momentum); | 196 | public abstract void SetMomentum(PhysicsVector momentum); |
197 | |||
198 | |||
193 | } | 199 | } |
194 | 200 | ||
195 | public class NullPhysicsActor : PhysicsActor | 201 | public class NullPhysicsActor : PhysicsActor |
@@ -206,6 +212,17 @@ namespace OpenSim.Region.Physics.Manager | |||
206 | set { return; } | 212 | set { return; } |
207 | } | 213 | } |
208 | 214 | ||
215 | public override bool Grabbed | ||
216 | { | ||
217 | set { return; } | ||
218 | } | ||
219 | |||
220 | public override bool Selected | ||
221 | { | ||
222 | set { return; } | ||
223 | } | ||
224 | |||
225 | |||
209 | public override bool CollidingGround | 226 | public override bool CollidingGround |
210 | { | 227 | { |
211 | get { return false; } | 228 | get { return false; } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index f9010e6..3f63477 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -152,6 +152,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
152 | set { m_alwaysRun = value; } | 152 | set { m_alwaysRun = value; } |
153 | } | 153 | } |
154 | 154 | ||
155 | public override bool Grabbed | ||
156 | { | ||
157 | set { return; } | ||
158 | } | ||
159 | |||
160 | public override bool Selected | ||
161 | { | ||
162 | set { return; } | ||
163 | } | ||
164 | |||
165 | |||
155 | public override bool IsPhysical | 166 | public override bool IsPhysical |
156 | { | 167 | { |
157 | get { return false; } | 168 | get { return false; } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index dcff558..d70819e 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -202,6 +202,17 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
202 | set { return; } | 202 | set { return; } |
203 | } | 203 | } |
204 | 204 | ||
205 | public override bool Grabbed | ||
206 | { | ||
207 | set { return; } | ||
208 | } | ||
209 | |||
210 | public override bool Selected | ||
211 | { | ||
212 | set { return; } | ||
213 | } | ||
214 | |||
215 | |||
205 | public void enableBody() | 216 | public void enableBody() |
206 | { | 217 | { |
207 | // Sets the geom to a body | 218 | // Sets the geom to a body |
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 74b319a..2b07553 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |||
@@ -354,6 +354,16 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
354 | set { return; } | 354 | set { return; } |
355 | } | 355 | } |
356 | 356 | ||
357 | public override bool Grabbed | ||
358 | { | ||
359 | set { return; } | ||
360 | } | ||
361 | |||
362 | public override bool Selected | ||
363 | { | ||
364 | set { return; } | ||
365 | } | ||
366 | |||
357 | public override bool IsPhysical | 367 | public override bool IsPhysical |
358 | { | 368 | { |
359 | get { return false; } | 369 | get { return false; } |
@@ -607,5 +617,16 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
607 | get { return false; } | 617 | get { return false; } |
608 | set { return; } | 618 | set { return; } |
609 | } | 619 | } |
620 | |||
621 | public override bool Grabbed | ||
622 | { | ||
623 | set { return; } | ||
624 | } | ||
625 | |||
626 | public override bool Selected | ||
627 | { | ||
628 | set { return; } | ||
629 | } | ||
630 | |||
610 | } | 631 | } |
611 | } \ No newline at end of file | 632 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 20bf358..71bd94e 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | |||
@@ -224,6 +224,16 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
224 | set { return; } | 224 | set { return; } |
225 | } | 225 | } |
226 | 226 | ||
227 | public override bool Grabbed | ||
228 | { | ||
229 | set { return; } | ||
230 | } | ||
231 | |||
232 | public override bool Selected | ||
233 | { | ||
234 | set { return; } | ||
235 | } | ||
236 | |||
227 | public override bool IsPhysical | 237 | public override bool IsPhysical |
228 | { | 238 | { |
229 | get { return false; } | 239 | get { return false; } |
@@ -410,6 +420,16 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
410 | set { return; } | 420 | set { return; } |
411 | } | 421 | } |
412 | 422 | ||
423 | public override bool Grabbed | ||
424 | { | ||
425 | set { return; } | ||
426 | } | ||
427 | |||
428 | public override bool Selected | ||
429 | { | ||
430 | set { return; } | ||
431 | } | ||
432 | |||
413 | public override bool ThrottleUpdates | 433 | public override bool ThrottleUpdates |
414 | { | 434 | { |
415 | get { return false; } | 435 | get { return false; } |