aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorgareth2007-03-27 00:12:45 +0000
committergareth2007-03-27 00:12:45 +0000
commit99c837f0677f73a57443a76f923429ea71ebc7ef (patch)
tree0d5d5e80de46e330b198b8a52eaa30c309178ed8 /OpenSim.Physics/OdePlugin/OdePlugin.cs
parent(no commit message) (diff)
downloadopensim-SC-99c837f0677f73a57443a76f923429ea71ebc7ef.zip
opensim-SC-99c837f0677f73a57443a76f923429ea71ebc7ef.tar.gz
opensim-SC-99c837f0677f73a57443a76f923429ea71ebc7ef.tar.bz2
opensim-SC-99c837f0677f73a57443a76f923429ea71ebc7ef.tar.xz
ZOMG! CAPSULES AS BOUNDING VOLUMES!
Diffstat (limited to 'OpenSim.Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim.Physics/OdePlugin/OdePlugin.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim.Physics/OdePlugin/OdePlugin.cs
index 1dd3233..47c8c0d 100644
--- a/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim.Physics/OdePlugin/OdePlugin.cs
@@ -70,8 +70,8 @@ namespace OpenSim.Physics.OdePlugin
70 70
71 public class OdeScene :PhysicsScene 71 public class OdeScene :PhysicsScene
72 { 72 {
73 private IntPtr world; 73 public IntPtr world;
74 private IntPtr space; 74 public IntPtr space;
75 private IntPtr contactgroup; 75 private IntPtr contactgroup;
76 private double[] _heightmap; 76 private double[] _heightmap;
77 77
@@ -94,7 +94,7 @@ namespace OpenSim.Physics.OdePlugin
94 pos.X = position.X; 94 pos.X = position.X;
95 pos.Y = position.Y; 95 pos.Y = position.Y;
96 pos.Z = position.Z; 96 pos.Z = position.Z;
97 return new OdeCharacter(); 97 return new OdeCharacter(this,pos);
98 } 98 }
99 99
100 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 100 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
@@ -139,19 +139,24 @@ namespace OpenSim.Physics.OdePlugin
139 } 139 }
140 } 140 }
141 141
142 public class OdeCharacter : PhysicsActor 142 public class OdeCharacter : PhysicsActor
143 { 143 {
144 private PhysicsVector _position; 144 private PhysicsVector _position;
145 private PhysicsVector _velocity; 145 private PhysicsVector _velocity;
146 private PhysicsVector _acceleration; 146 private PhysicsVector _acceleration;
147 private bool flying; 147 private bool flying;
148 private float gravityAccel; 148 private float gravityAccel;
149 149 private IntPtr BoundingCapsule;
150 public OdeCharacter() 150 IntPtr capsule_geom;
151 d.Mass capsule_mass;
152
153 public OdeCharacter(OdeScene parent_scene, PhysicsVector pos)
151 { 154 {
152 _velocity = new PhysicsVector(); 155 _velocity = new PhysicsVector();
153 _position = new PhysicsVector(); 156 _position = pos;
154 _acceleration = new PhysicsVector(); 157 _acceleration = new PhysicsVector();
158 d.MassSetCapsule(out capsule_mass, 5.0f, 3, 0.5f, 2f);
159 capsule_geom = d.CreateCapsule(parent_scene.space, 0.5f, 2f);
155 } 160 }
156 161
157 public override bool Flying 162 public override bool Flying