aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsScene.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs92
1 files changed, 4 insertions, 88 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 2f59434..30623a0 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -39,6 +39,10 @@ namespace OpenSim.Region.Physics.Manager
39 public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal); 39 public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal);
40 public delegate void RayCallback(List<ContactResult> list); 40 public delegate void RayCallback(List<ContactResult> list);
41 41
42 public delegate void JointMoved(PhysicsJoint joint);
43 public delegate void JointDeactivated(PhysicsJoint joint);
44 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
45
42 /// <summary> 46 /// <summary>
43 /// Contact result from a raycast. 47 /// Contact result from a raycast.
44 /// </summary> 48 /// </summary>
@@ -261,93 +265,5 @@ namespace OpenSim.Region.Physics.Manager
261 { 265 {
262 return new List<ContactResult>(); 266 return new List<ContactResult>();
263 } 267 }
264
265 private class NullPhysicsScene : PhysicsScene
266 {
267 private static int m_workIndicator;
268
269
270 public override void Initialise(IMesher meshmerizer, IConfigSource config)
271 {
272 // Does nothing right now
273 }
274
275 public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
276 {
277 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position);
278 return PhysicsActor.Null;
279 }
280
281 public override void RemoveAvatar(PhysicsActor actor)
282 {
283 }
284
285 public override void RemovePrim(PhysicsActor prim)
286 {
287 }
288 public override void SetWaterLevel(float baseheight)
289 {
290
291 }
292
293/*
294 public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion rotation)
295 {
296 m_log.InfoFormat("NullPhysicsScene : AddPrim({0},{1})", position, size);
297 return PhysicsActor.Null;
298 }
299*/
300
301 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
302 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
303 {
304 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size);
305 return PhysicsActor.Null;
306 }
307
308 public override void AddPhysicsActorTaint(PhysicsActor prim)
309 {
310 }
311
312 public override float Simulate(float timeStep)
313 {
314 m_workIndicator = (m_workIndicator + 1) % 10;
315
316 return 0f;
317 }
318
319 public override void GetResults()
320 {
321 m_log.Info("[PHYSICS]: NullPhysicsScene : GetResults()");
322 }
323
324 public override void SetTerrain(float[] heightMap)
325 {
326 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
327 }
328
329 public override void DeleteTerrain()
330 {
331 }
332
333 public override bool IsThreaded
334 {
335 get { return false; }
336 }
337
338 public override void Dispose()
339 {
340 }
341
342 public override Dictionary<uint,float> GetTopColliders()
343 {
344 Dictionary<uint, float> returncolliders = new Dictionary<uint, float>();
345 return returncolliders;
346 }
347
348 }
349 } 268 }
350 public delegate void JointMoved(PhysicsJoint joint);
351 public delegate void JointDeactivated(PhysicsJoint joint);
352 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
353} 269}