diff options
author | Robert Adams | 2012-03-21 07:07:44 -0700 |
---|---|---|
committer | Robert Adams | 2012-03-23 13:15:18 -0700 |
commit | 1a738caecab74c5b9f6b6bac69a3ea9ccdc80b24 (patch) | |
tree | a8c4f41ae006784d6944047d62eaf82442116db8 /OpenSim/Region/Physics | |
parent | BulletSim: Add AvatarRestitution parameter. Centralize computation of buoyanc... (diff) | |
download | opensim-SC-1a738caecab74c5b9f6b6bac69a3ea9ccdc80b24.zip opensim-SC-1a738caecab74c5b9f6b6bac69a3ea9ccdc80b24.tar.gz opensim-SC-1a738caecab74c5b9f6b6bac69a3ea9ccdc80b24.tar.bz2 opensim-SC-1a738caecab74c5b9f6b6bac69a3ea9ccdc80b24.tar.xz |
BulletSim: update TODO list. Rearrange code for readability. Add per object friction and restitution runtime settable parameters.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 30 |
2 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 1a61431..20708d9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -261,7 +261,7 @@ public class BSCharacter : PhysicsActor | |||
261 | set { | 261 | set { |
262 | _flying = value; | 262 | _flying = value; |
263 | // simulate flying by changing the effect of gravity | 263 | // simulate flying by changing the effect of gravity |
264 | this.Buoyancy(ComputeBuoyancyFromFlying(_flying)); | 264 | this.Buoyancy = ComputeBuoyancyFromFlying(_flying); |
265 | } | 265 | } |
266 | } | 266 | } |
267 | private float ComputeBuoyancyFromFlying(bool ifFlying) { | 267 | private float ComputeBuoyancyFromFlying(bool ifFlying) { |
@@ -356,7 +356,7 @@ public class BSCharacter : PhysicsActor | |||
356 | } | 356 | } |
357 | else | 357 | else |
358 | { | 358 | { |
359 | m_log.WarnFormat("{0}: Got a NaN force applied to a Character", LogHeader); | 359 | m_log.ErrorFormat("{0}: Got a NaN force applied to a Character", LogHeader); |
360 | } | 360 | } |
361 | //m_lastUpdateSent = false; | 361 | //m_lastUpdateSent = false; |
362 | } | 362 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 9b12b4f..142103b 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -37,14 +37,18 @@ using OpenMetaverse; | |||
37 | using OpenSim.Region.Framework; | 37 | using OpenSim.Region.Framework; |
38 | 38 | ||
39 | // TODOs for BulletSim (for BSScene, BSPrim, BSCharacter and BulletSim) | 39 | // TODOs for BulletSim (for BSScene, BSPrim, BSCharacter and BulletSim) |
40 | // Debug linkset | ||
41 | // Test with multiple regions in one simulator | ||
40 | // Adjust character capsule size when height is adjusted (ScenePresence.SetHeight) | 42 | // Adjust character capsule size when height is adjusted (ScenePresence.SetHeight) |
41 | // Test sculpties | 43 | // Test sculpties |
42 | // Compute physics FPS reasonably | 44 | // Compute physics FPS reasonably |
43 | // Based on material, set density and friction | 45 | // Based on material, set density and friction |
44 | // More efficient memory usage in passing hull information from BSPrim to BulletSim | 46 | // More efficient memory usage when passing hull information from BSPrim to BulletSim |
45 | // Four states of prim: Physical, regular, phantom and selected. Are we modeling these correctly? | 47 | // Four states of prim: Physical, regular, phantom and selected. Are we modeling these correctly? |
46 | // In SL one can set both physical and phantom (gravity, does not effect others, makes collisions with ground) | 48 | // In SL one can set both physical and phantom (gravity, does not effect others, makes collisions with ground) |
47 | // At the moment, physical and phantom causes object to drop through the terrain | 49 | // At the moment, physical and phantom causes object to drop through the terrain |
50 | // Physical phantom objects and related typing (collision options ) | ||
51 | // Check out llVolumeDetect. Must do something for that. | ||
48 | // Should prim.link() and prim.delink() membership checking happen at taint time? | 52 | // Should prim.link() and prim.delink() membership checking happen at taint time? |
49 | // Mesh sharing. Use meshHash to tell if we already have a hull of that shape and only create once | 53 | // Mesh sharing. Use meshHash to tell if we already have a hull of that shape and only create once |
50 | // Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect | 54 | // Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect |
@@ -53,17 +57,14 @@ using OpenSim.Region.Framework; | |||
53 | // Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) | 57 | // Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) |
54 | // Does NeedsMeshing() really need to exclude all the different shapes? | 58 | // Does NeedsMeshing() really need to exclude all the different shapes? |
55 | // Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet. | 59 | // Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet. |
56 | // Add PID movement operations | 60 | // Add PID movement operations. What does ScenePresence.MoveToTarget do? |
57 | // Debug linkset | ||
58 | // Ccd threshold to defaults (0.0) | ||
59 | // Command line get and set is broken | ||
60 | // Check terrain size. 128 or 127? | 61 | // Check terrain size. 128 or 127? |
61 | // Test with multiple regions in one simulator | ||
62 | // Multiple contact points on collision? | 62 | // Multiple contact points on collision? |
63 | // See code in ode::near... calls to collision_accounting_events() | 63 | // See code in ode::near... calls to collision_accounting_events() |
64 | // (This might not be a problem. ODE collects all the collisions with one object in one tick.) | ||
64 | // Use collision masks for collision with terrain and phantom objects | 65 | // Use collision masks for collision with terrain and phantom objects |
65 | // Check out llVolumeDetect. Must do something for that. | 66 | // Figure out how to not allocate a new Dictionary and List for every collision |
66 | // Physical phantom objects and related typing (collision options ) | 67 | // in BSPrim.Collide() and BSCharacter.Collide(). Can the same ones be reused? |
67 | // Raycast | 68 | // Raycast |
68 | // | 69 | // |
69 | namespace OpenSim.Region.Physics.BulletSPlugin | 70 | namespace OpenSim.Region.Physics.BulletSPlugin |
@@ -282,7 +283,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
282 | parms.avatarFriction = pConfig.GetFloat("AvatarFriction", parms.avatarFriction); | 283 | parms.avatarFriction = pConfig.GetFloat("AvatarFriction", parms.avatarFriction); |
283 | parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); | 284 | parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); |
284 | parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity); | 285 | parms.avatarDensity = pConfig.GetFloat("AvatarDensity", parms.avatarDensity); |
285 | parms.avatarRestitution = pConfig.GetFloat("AvatarRestitution", parms.avatarRestitution); | ||
286 | parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius); | 286 | parms.avatarCapsuleRadius = pConfig.GetFloat("AvatarCapsuleRadius", parms.avatarCapsuleRadius); |
287 | parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight); | 287 | parms.avatarCapsuleHeight = pConfig.GetFloat("AvatarCapsuleHeight", parms.avatarCapsuleHeight); |
288 | } | 288 | } |
@@ -408,16 +408,16 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
408 | { | 408 | { |
409 | EntityProperties entprop = m_updateArray[ii]; | 409 | EntityProperties entprop = m_updateArray[ii]; |
410 | // m_log.DebugFormat("{0}: entprop[{1}]: id={2}, pos={3}", LogHeader, ii, entprop.ID, entprop.Position); | 410 | // m_log.DebugFormat("{0}: entprop[{1}]: id={2}, pos={3}", LogHeader, ii, entprop.ID, entprop.Position); |
411 | BSCharacter actor; | ||
412 | if (m_avatars.TryGetValue(entprop.ID, out actor)) | ||
413 | { | ||
414 | actor.UpdateProperties(entprop); | ||
415 | continue; | ||
416 | } | ||
417 | BSPrim prim; | 411 | BSPrim prim; |
418 | if (m_prims.TryGetValue(entprop.ID, out prim)) | 412 | if (m_prims.TryGetValue(entprop.ID, out prim)) |
419 | { | 413 | { |
420 | prim.UpdateProperties(entprop); | 414 | prim.UpdateProperties(entprop); |
415 | continue; | ||
416 | } | ||
417 | BSCharacter actor; | ||
418 | if (m_avatars.TryGetValue(entprop.ID, out actor)) | ||
419 | { | ||
420 | actor.UpdateProperties(entprop); | ||
421 | } | 421 | } |
422 | } | 422 | } |
423 | } | 423 | } |