diff options
author | Robert Adams | 2013-03-31 09:12:18 -0700 |
---|---|---|
committer | Robert Adams | 2013-03-31 22:19:41 -0700 |
commit | 2c581cae2a77628704ae7ae2f9f0f0a87cbb0072 (patch) | |
tree | 2095b9afd1a0c984119fcac98e3dfd94ab99aabb /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | Export permission, part two. Setting export perms for textures and clothing w... (diff) | |
download | opensim-SC-2c581cae2a77628704ae7ae2f9f0f0a87cbb0072.zip opensim-SC-2c581cae2a77628704ae7ae2f9f0f0a87cbb0072.tar.gz opensim-SC-2c581cae2a77628704ae7ae2f9f0f0a87cbb0072.tar.bz2 opensim-SC-2c581cae2a77628704ae7ae2f9f0f0a87cbb0072.tar.xz |
BulletSim: Add physical 'actors' that operate on the physical object.
Add first 'actor' for locked axis.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 6bb88c7..cba2646 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -78,6 +78,9 @@ public abstract class BSPhysObject : PhysicsActor | |||
78 | Name = name; // PhysicsActor also has the name of the object. Someday consolidate. | 78 | Name = name; // PhysicsActor also has the name of the object. Someday consolidate. |
79 | TypeName = typeName; | 79 | TypeName = typeName; |
80 | 80 | ||
81 | // The collection of things that push me around | ||
82 | PhysicalActors = new BSActorCollection(PhysicsScene); | ||
83 | |||
81 | // Initialize variables kept in base. | 84 | // Initialize variables kept in base. |
82 | GravModifier = 1.0f; | 85 | GravModifier = 1.0f; |
83 | Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); | 86 | Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); |
@@ -109,6 +112,10 @@ public abstract class BSPhysObject : PhysicsActor | |||
109 | { | 112 | { |
110 | UnRegisterAllPreStepActions(); | 113 | UnRegisterAllPreStepActions(); |
111 | UnRegisterAllPostStepActions(); | 114 | UnRegisterAllPostStepActions(); |
115 | PhysicsScene.TaintedObject("BSPhysObject.Destroy", delegate() | ||
116 | { | ||
117 | PhysicalActors.Release(); | ||
118 | }); | ||
112 | } | 119 | } |
113 | 120 | ||
114 | public BSScene PhysicsScene { get; protected set; } | 121 | public BSScene PhysicsScene { get; protected set; } |
@@ -230,6 +237,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
230 | 237 | ||
231 | public OMV.Vector3 LockedAxis { get; set; } // zero means locked. one means free. | 238 | public OMV.Vector3 LockedAxis { get; set; } // zero means locked. one means free. |
232 | public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(1f, 1f, 1f); // All axis are free | 239 | public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(1f, 1f, 1f); // All axis are free |
240 | public readonly String LockedAxisActorName = "BSPrim.LockedAxis"; | ||
233 | 241 | ||
234 | #region Collisions | 242 | #region Collisions |
235 | 243 | ||
@@ -413,6 +421,9 @@ public abstract class BSPhysObject : PhysicsActor | |||
413 | #endregion // Collisions | 421 | #endregion // Collisions |
414 | 422 | ||
415 | #region Per Simulation Step actions | 423 | #region Per Simulation Step actions |
424 | |||
425 | public BSActorCollection PhysicalActors; | ||
426 | |||
416 | // There are some actions that must be performed for a physical object before each simulation step. | 427 | // There are some actions that must be performed for a physical object before each simulation step. |
417 | // These actions are optional so, rather than scanning all the physical objects and asking them | 428 | // These actions are optional so, rather than scanning all the physical objects and asking them |
418 | // if they have anything to do, a physical object registers for an event call before the step is performed. | 429 | // if they have anything to do, a physical object registers for an event call before the step is performed. |