diff options
author | Robert Adams | 2012-11-06 17:58:55 -0800 |
---|---|---|
committer | Robert Adams | 2012-11-06 18:16:35 -0800 |
commit | 76cc3030314b3302da46bfe4078f076ba1b3d8a1 (patch) | |
tree | defc41af21d4542789c00a93452d5793ec7f896d /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | BulletSim: remove limit on taints that can happen before a step. Remove some ... (diff) | |
download | opensim-SC-76cc3030314b3302da46bfe4078f076ba1b3d8a1.zip opensim-SC-76cc3030314b3302da46bfe4078f076ba1b3d8a1.tar.gz opensim-SC-76cc3030314b3302da46bfe4078f076ba1b3d8a1.tar.bz2 opensim-SC-76cc3030314b3302da46bfe4078f076ba1b3d8a1.tar.xz |
BulletSim: Add ZeroAngularMotion method to physical objects. Add inTaint flag to ZeroMotion method. Update the references to those functions.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 7127aaf..e803072 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -34,9 +34,17 @@ using OpenSim.Region.Physics.Manager; | |||
34 | 34 | ||
35 | namespace OpenSim.Region.Physics.BulletSPlugin | 35 | namespace OpenSim.Region.Physics.BulletSPlugin |
36 | { | 36 | { |
37 | // Class to wrap all objects. | 37 | /* |
38 | // The rest of BulletSim doesn't need to keep checking for avatars or prims | 38 | * Class to wrap all objects. |
39 | // unless the difference is significant. | 39 | * The rest of BulletSim doesn't need to keep checking for avatars or prims |
40 | * unless the difference is significant. | ||
41 | * | ||
42 | * Variables in the physicsl objects are in three forms: | ||
43 | * VariableName: used by the simulator and performs taint operations, etc | ||
44 | * RawVariableName: direct reference to the BulletSim storage for the variable value | ||
45 | * ForceVariableName: direct reference (store and fetch) to the value in the physics engine. | ||
46 | * The last two (and certainly the last one) should be referenced only in taint-time. | ||
47 | */ | ||
40 | public abstract class BSPhysObject : PhysicsActor | 48 | public abstract class BSPhysObject : PhysicsActor |
41 | { | 49 | { |
42 | protected void BaseInitialize(BSScene parentScene, uint localID, string name, string typeName) | 50 | protected void BaseInitialize(BSScene parentScene, uint localID, string name, string typeName) |
@@ -67,6 +75,9 @@ public abstract class BSPhysObject : PhysicsActor | |||
67 | // Set the raw mass but also update physical mass properties (inertia, ...) | 75 | // Set the raw mass but also update physical mass properties (inertia, ...) |
68 | public abstract void UpdatePhysicalMassProperties(float mass); | 76 | public abstract void UpdatePhysicalMassProperties(float mass); |
69 | 77 | ||
78 | // The last value calculated for the prim's inertia | ||
79 | public OMV.Vector3 Inertia { get; set; } | ||
80 | |||
70 | // Reference to the physical body (btCollisionObject) of this object | 81 | // Reference to the physical body (btCollisionObject) of this object |
71 | public BulletBody PhysBody; | 82 | public BulletBody PhysBody; |
72 | // Reference to the physical shape (btCollisionShape) of this object | 83 | // Reference to the physical shape (btCollisionShape) of this object |
@@ -96,7 +107,8 @@ public abstract class BSPhysObject : PhysicsActor | |||
96 | public abstract bool IsStatic { get; } | 107 | public abstract bool IsStatic { get; } |
97 | 108 | ||
98 | // Stop all physical motion. | 109 | // Stop all physical motion. |
99 | public abstract void ZeroMotion(); | 110 | public abstract void ZeroMotion(bool inTaintTime); |
111 | public abstract void ZeroAngularMotion(bool inTaintTime); | ||
100 | 112 | ||
101 | // Step the vehicle simulation for this object. A NOOP if the vehicle was not configured. | 113 | // Step the vehicle simulation for this object. A NOOP if the vehicle was not configured. |
102 | public virtual void StepVehicle(float timeStep) { } | 114 | public virtual void StepVehicle(float timeStep) { } |