aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index f2e62d9..96cd55e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
35public abstract class BSShape 35public abstract class BSShape
36{ 36{
37 public IntPtr ptr { get; set; } 37 public IntPtr ptr { get; set; }
38 public PhysicsShapeType type { get; set; } 38 public BSPhysicsShapeType type { get; set; }
39 public System.UInt64 key { get; set; } 39 public System.UInt64 key { get; set; }
40 public int referenceCount { get; set; } 40 public int referenceCount { get; set; }
41 public DateTime lastReferenced { get; set; } 41 public DateTime lastReferenced { get; set; }
@@ -43,7 +43,7 @@ public abstract class BSShape
43 public BSShape() 43 public BSShape()
44 { 44 {
45 ptr = IntPtr.Zero; 45 ptr = IntPtr.Zero;
46 type = PhysicsShapeType.SHAPE_UNKNOWN; 46 type = BSPhysicsShapeType.SHAPE_UNKNOWN;
47 key = 0; 47 key = 0;
48 referenceCount = 0; 48 referenceCount = 0;
49 lastReferenced = DateTime.Now; 49 lastReferenced = DateTime.Now;
@@ -54,17 +54,17 @@ public abstract class BSShape
54 { 54 {
55 BSShape ret = null; 55 BSShape ret = null;
56 56
57 if (prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_CAPSULE) 57 if (prim.PreferredPhysicalShape == BSPhysicsShapeType.SHAPE_CAPSULE)
58 { 58 {
59 // an avatar capsule is close to a native shape (it is not shared) 59 // an avatar capsule is close to a native shape (it is not shared)
60 ret = BSShapeNative.GetReference(physicsScene, prim, PhysicsShapeType.SHAPE_CAPSULE, 60 ret = BSShapeNative.GetReference(physicsScene, prim, BSPhysicsShapeType.SHAPE_CAPSULE,
61 FixedShapeKey.KEY_CAPSULE); 61 FixedShapeKey.KEY_CAPSULE);
62 physicsScene.DetailLog("{0},BSShape.GetShapeReference,avatarCapsule,shape={1}", prim.LocalID, ret); 62 physicsScene.DetailLog("{0},BSShape.GetShapeReference,avatarCapsule,shape={1}", prim.LocalID, ret);
63 } 63 }
64 64
65 // Compound shapes are handled special as they are rebuilt from scratch. 65 // Compound shapes are handled special as they are rebuilt from scratch.
66 // This isn't too great a hardship since most of the child shapes will already been created. 66 // This isn't too great a hardship since most of the child shapes will already been created.
67 if (ret == null && prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_COMPOUND) 67 if (ret == null && prim.PreferredPhysicalShape == BSPhysicsShapeType.SHAPE_COMPOUND)
68 { 68 {
69 // Getting a reference to a compound shape gets you the compound shape with the root prim shape added 69 // Getting a reference to a compound shape gets you the compound shape with the root prim shape added
70 ret = BSShapeCompound.GetReference(prim); 70 ret = BSShapeCompound.GetReference(prim);
@@ -123,14 +123,14 @@ public class BSShapeNative : BSShape
123 { 123 {
124 } 124 }
125 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim, 125 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim,
126 PhysicsShapeType shapeType, FixedShapeKey shapeKey) 126 BSPhysicsShapeType shapeType, FixedShapeKey shapeKey)
127 { 127 {
128 // Native shapes are not shared and are always built anew. 128 // Native shapes are not shared and are always built anew.
129 return new BSShapeNative(physicsScene, prim, shapeType, shapeKey); 129 return new BSShapeNative(physicsScene, prim, shapeType, shapeKey);
130 } 130 }
131 131
132 private BSShapeNative(BSScene physicsScene, BSPhysObject prim, 132 private BSShapeNative(BSScene physicsScene, BSPhysObject prim,
133 PhysicsShapeType shapeType, FixedShapeKey shapeKey) 133 BSPhysicsShapeType shapeType, FixedShapeKey shapeKey)
134 { 134 {
135 ShapeData nativeShapeData = new ShapeData(); 135 ShapeData nativeShapeData = new ShapeData();
136 nativeShapeData.Type = shapeType; 136 nativeShapeData.Type = shapeType;
@@ -141,7 +141,7 @@ public class BSShapeNative : BSShape
141 nativeShapeData.HullKey = (ulong)shapeKey; 141 nativeShapeData.HullKey = (ulong)shapeKey;
142 142
143 143
144 if (shapeType == PhysicsShapeType.SHAPE_CAPSULE) 144 if (shapeType == BSPhysicsShapeType.SHAPE_CAPSULE)
145 { 145 {
146 ptr = BulletSimAPI.BuildCapsuleShape2(physicsScene.World.ptr, 1f, 1f, prim.Scale); 146 ptr = BulletSimAPI.BuildCapsuleShape2(physicsScene.World.ptr, 1f, 1f, prim.Scale);
147 physicsScene.DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale); 147 physicsScene.DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale);