aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2013-04-28 14:55:46 -0700
committerRobert Adams2013-04-29 07:38:44 -0700
commit2da8e60b6deec472bc979ec33e99c16c5baf0b01 (patch)
treeec8e760bd48ab67744d62940c21d87a5df6446ff /OpenSim/Region
parentBulletSim: massive refactor of shape classes. Removed shape specific code fro... (diff)
downloadopensim-SC_OLD-2da8e60b6deec472bc979ec33e99c16c5baf0b01.zip
opensim-SC_OLD-2da8e60b6deec472bc979ec33e99c16c5baf0b01.tar.gz
opensim-SC_OLD-2da8e60b6deec472bc979ec33e99c16c5baf0b01.tar.bz2
opensim-SC_OLD-2da8e60b6deec472bc979ec33e99c16c5baf0b01.tar.xz
BulletSim: code for creating the avatar capsule shape.
Diffstat (limited to 'OpenSim/Region')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 3c23509..19855da 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -131,6 +131,17 @@ public sealed class BSShapeCollection : IDisposable
131 bool nativeShapePossible = true; 131 bool nativeShapePossible = true;
132 PrimitiveBaseShape pbs = prim.BaseShape; 132 PrimitiveBaseShape pbs = prim.BaseShape;
133 133
134 // Kludge to create the capsule for the avatar.
135 BSCharacter theChar = prim as BSCharacter;
136 if (theChar != null)
137 {
138 DereferenceExistingShape(prim, shapeCallback);
139 prim.PhysShape = BSShapeNative.GetReference(m_physicsScene, prim,
140 BSPhysicsShapeType.SHAPE_CAPSULE, FixedShapeKey.KEY_CAPSULE);
141 ret = true;
142 haveShape = true;
143 }
144
134 // If the prim attributes are simple, this could be a simple Bullet native shape 145 // If the prim attributes are simple, this could be a simple Bullet native shape
135 // Native shapes work whether to object is static or physical. 146 // Native shapes work whether to object is static or physical.
136 if (!haveShape 147 if (!haveShape
@@ -160,6 +171,7 @@ public sealed class BSShapeCollection : IDisposable
160 DereferenceExistingShape(prim, shapeCallback); 171 DereferenceExistingShape(prim, shapeCallback);
161 prim.PhysShape = BSShapeNative.GetReference(m_physicsScene, prim, 172 prim.PhysShape = BSShapeNative.GetReference(m_physicsScene, prim,
162 BSPhysicsShapeType.SHAPE_SPHERE, FixedShapeKey.KEY_SPHERE); 173 BSPhysicsShapeType.SHAPE_SPHERE, FixedShapeKey.KEY_SPHERE);
174 ret = true;
163 } 175 }
164 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},rebuilt={2},shape={3}", 176 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},rebuilt={2},shape={3}",
165 prim.LocalID, forceRebuild, ret, prim.PhysShape); 177 prim.LocalID, forceRebuild, ret, prim.PhysShape);
@@ -176,6 +188,7 @@ public sealed class BSShapeCollection : IDisposable
176 DereferenceExistingShape(prim, shapeCallback); 188 DereferenceExistingShape(prim, shapeCallback);
177 prim.PhysShape = BSShapeNative.GetReference(m_physicsScene, prim, 189 prim.PhysShape = BSShapeNative.GetReference(m_physicsScene, prim,
178 BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); 190 BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX);
191 ret = true;
179 } 192 }
180 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},rebuilt={2},shape={3}", 193 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},rebuilt={2},shape={3}",
181 prim.LocalID, forceRebuild, ret, prim.PhysShape); 194 prim.LocalID, forceRebuild, ret, prim.PhysShape);