diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-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) { } |