From 2c581cae2a77628704ae7ae2f9f0f0a87cbb0072 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 31 Mar 2013 09:12:18 -0700 Subject: BulletSim: Add physical 'actors' that operate on the physical object. Add first 'actor' for locked axis. --- OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs') 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 Name = name; // PhysicsActor also has the name of the object. Someday consolidate. TypeName = typeName; + // The collection of things that push me around + PhysicalActors = new BSActorCollection(PhysicsScene); + // Initialize variables kept in base. GravModifier = 1.0f; Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); @@ -109,6 +112,10 @@ public abstract class BSPhysObject : PhysicsActor { UnRegisterAllPreStepActions(); UnRegisterAllPostStepActions(); + PhysicsScene.TaintedObject("BSPhysObject.Destroy", delegate() + { + PhysicalActors.Release(); + }); } public BSScene PhysicsScene { get; protected set; } @@ -230,6 +237,7 @@ public abstract class BSPhysObject : PhysicsActor public OMV.Vector3 LockedAxis { get; set; } // zero means locked. one means free. public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(1f, 1f, 1f); // All axis are free + public readonly String LockedAxisActorName = "BSPrim.LockedAxis"; #region Collisions @@ -413,6 +421,9 @@ public abstract class BSPhysObject : PhysicsActor #endregion // Collisions #region Per Simulation Step actions + + public BSActorCollection PhysicalActors; + // There are some actions that must be performed for a physical object before each simulation step. // These actions are optional so, rather than scanning all the physical objects and asking them // if they have anything to do, a physical object registers for an event call before the step is performed. -- cgit v1.1 From 747ece59d20370115fdaf90a5a08ab77f5605b1c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 31 Mar 2013 17:36:15 -0700 Subject: BulletSim: convert BSDynamic to a BSActor and change BSPrim to set up the vehicle actor. --- OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index cba2646..98ea833 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs @@ -187,7 +187,7 @@ public abstract class BSPhysObject : PhysicsActor Friction = matAttrib.friction; Restitution = matAttrib.restitution; Density = matAttrib.density / BSParam.DensityScaleFactor; - DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density); + // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density); } // Stop all physical motion. -- cgit v1.1