aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorMW2007-08-23 17:21:08 +0000
committerMW2007-08-23 17:21:08 +0000
commit0d5311e49bf5700efcf779bfa4bc83a00585c424 (patch)
tree168ea226f01a7e486f4dd6f288ef00afdd67ff68 /OpenSim/Region/Physics/OdePlugin
parentgrouping of functions to make the overall logic easier to grasp for people, (diff)
downloadopensim-SC_OLD-0d5311e49bf5700efcf779bfa4bc83a00585c424.zip
opensim-SC_OLD-0d5311e49bf5700efcf779bfa4bc83a00585c424.tar.gz
opensim-SC_OLD-0d5311e49bf5700efcf779bfa4bc83a00585c424.tar.bz2
opensim-SC_OLD-0d5311e49bf5700efcf779bfa4bc83a00585c424.tar.xz
Added RemovePrim method to the physics plugins interface.
Implemented that method in ODE plugin. Hooked it up so when deleting/taking prims into your inventory they will be removed from physics engine. Enabled the other physics hook ups in Scene.cs (and also added registering prims with physics plugin when they are rezzed from Inventory.) So now to get the avatar to prim collision testing working, just change to use the ODE plugin (in the OpenSim.ini file, physics = OpenDynamicsEngine). Remember though ODE only really works (without problems) when running with a single region.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index f168340..420693b 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -143,7 +143,16 @@ namespace OpenSim.Region.Physics.OdePlugin
143 143
144 public override void RemoveAvatar(PhysicsActor actor) 144 public override void RemoveAvatar(PhysicsActor actor)
145 { 145 {
146
147 }
146 148
149 public override void RemovePrim(PhysicsActor prim)
150 {
151 if (prim is OdePrim)
152 {
153 d.GeomDestroy(((OdePrim)prim).prim_geom);
154 this._prims.Remove((OdePrim)prim);
155 }
147 } 156 }
148 157
149 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) 158 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation)
@@ -397,7 +406,7 @@ namespace OpenSim.Region.Physics.OdePlugin
397 private PhysicsVector _size; 406 private PhysicsVector _size;
398 private PhysicsVector _acceleration; 407 private PhysicsVector _acceleration;
399 private Quaternion _orientation; 408 private Quaternion _orientation;
400 IntPtr prim_geom; 409 public IntPtr prim_geom;
401 410
402 public OdePrim(OdeScene parent_scene, PhysicsVector pos, PhysicsVector size, Quaternion rotation) 411 public OdePrim(OdeScene parent_scene, PhysicsVector pos, PhysicsVector size, Quaternion rotation)
403 { 412 {