aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-02 09:53:41 -0700
committerRobert Adams2012-11-03 21:15:30 -0700
commitb0eccd5044b1a20b995a62d6fb76fdd73b712f9a (patch)
tree877464740b99169d2e8f38bc8c75a33b37e9d475 /OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
parentBulletSim: Add RawPosition and RawOrientation to BSPhysObject and rename Mass... (diff)
downloadopensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.zip
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.gz
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.bz2
opensim-SC_OLD-b0eccd5044b1a20b995a62d6fb76fdd73b712f9a.tar.xz
BulletSim: debugging of compound shape implementation of linksets.
Add compound shape creation and freeing in shape manager. Add optional taint-time execution method and update code to use it. Add API2 linkage for more compound shape methods (get num, get/remove by index, ...) Modify perferred shape return so linkset children can have differet shapes than root. Add Position and Orientation calls to linksets so children can be moved around by the linkset by its own calculation. Allows for very general linkset implementations.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index 9e0f499..8f973f4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -48,7 +48,8 @@ public abstract class BSLinkset
48 */ 48 */
49 49
50 // at the moment, there is only one 50 // at the moment, there is only one
51 ret = new BSLinksetConstraints(physScene, parent); 51 // ret = new BSLinksetConstraints(physScene, parent);
52 ret = new BSLinksetCompound(physScene, parent);
52 53
53 return ret; 54 return ret;
54 } 55 }
@@ -69,10 +70,19 @@ public abstract class BSLinkset
69 protected object m_linksetActivityLock = new Object(); 70 protected object m_linksetActivityLock = new Object();
70 71
71 // Some linksets have a preferred physical shape. 72 // Some linksets have a preferred physical shape.
72 // Returns SHAPE_UNKNOWN if there is no preference. 73 // Returns SHAPE_UNKNOWN if there is no preference. Causes the correct shape to be selected.
73 public virtual ShapeData.PhysicsShapeType PreferredPhysicalShape 74 public virtual ShapeData.PhysicsShapeType PreferredPhysicalShape(BSPhysObject requestor)
74 { get { return ShapeData.PhysicsShapeType.SHAPE_UNKNOWN; } } 75 {
76 return ShapeData.PhysicsShapeType.SHAPE_UNKNOWN;
77 }
75 78
79 // Linksets move around the children so the linkset might need to compute the child position
80 public virtual OMV.Vector3 Position(BSPhysObject member)
81 { return member.RawPosition; }
82 public virtual OMV.Quaternion Orientation(BSPhysObject member)
83 { return member.RawOrientation; }
84 // TODO: does this need to be done for Velocity and RotationalVelocityy?
85
76 // We keep the prim's mass in the linkset structure since it could be dependent on other prims 86 // We keep the prim's mass in the linkset structure since it could be dependent on other prims
77 protected float m_mass; 87 protected float m_mass;
78 public float LinksetMass 88 public float LinksetMass
@@ -177,7 +187,6 @@ public abstract class BSLinkset
177 } 187 }
178 188
179 // Perform an action on each member of the linkset including root prim. 189 // Perform an action on each member of the linkset including root prim.
180 // The action is performed only on the objects that are physically in the linkset.
181 // Depends on the action on whether this should be done at taint time. 190 // Depends on the action on whether this should be done at taint time.
182 public delegate bool ForEachMemberAction(BSPhysObject obj); 191 public delegate bool ForEachMemberAction(BSPhysObject obj);
183 public virtual bool ForEachMember(ForEachMemberAction action) 192 public virtual bool ForEachMember(ForEachMemberAction action)