BulletSim: rename SHAPE_AVATAR to SHAPE_CAPSULE with the eye to eventually having mesh avatars.

connector_plugin
Robert Adams 2012-11-20 11:33:42 -08:00
parent 65e55ada87
commit 8dd5813889
4 changed files with 8 additions and 8 deletions

View File

@ -205,7 +205,7 @@ public sealed class BSCharacter : BSPhysObject
// I want the physics engine to make an avatar capsule // I want the physics engine to make an avatar capsule
public override PhysicsShapeType PreferredPhysicalShape public override PhysicsShapeType PreferredPhysicalShape
{ {
get {return PhysicsShapeType.SHAPE_AVATAR; } get {return PhysicsShapeType.SHAPE_CAPSULE; }
} }
public override bool Grabbed { public override bool Grabbed {

View File

@ -405,10 +405,10 @@ public sealed class BSShapeCollection : IDisposable
bool ret = false; bool ret = false;
bool haveShape = false; bool haveShape = false;
if (!haveShape && prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_AVATAR) if (!haveShape && prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_CAPSULE)
{ {
// an avatar capsule is close to a native shape (it is not shared) // an avatar capsule is close to a native shape (it is not shared)
ret = GetReferenceToNativeShape(prim, PhysicsShapeType.SHAPE_AVATAR, ret = GetReferenceToNativeShape(prim, PhysicsShapeType.SHAPE_CAPSULE,
FixedShapeKey.KEY_CAPSULE, shapeCallback); FixedShapeKey.KEY_CAPSULE, shapeCallback);
DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.PhysShape); DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.PhysShape);
ret = true; ret = true;
@ -551,7 +551,7 @@ public sealed class BSShapeCollection : IDisposable
nativeShapeData.MeshKey = (ulong)shapeKey; nativeShapeData.MeshKey = (ulong)shapeKey;
nativeShapeData.HullKey = (ulong)shapeKey; nativeShapeData.HullKey = (ulong)shapeKey;
if (shapeType == PhysicsShapeType.SHAPE_AVATAR) if (shapeType == PhysicsShapeType.SHAPE_CAPSULE)
{ {
newShape = new BulletShape( newShape = new BulletShape(
BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1f, 1f, prim.Scale) BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1f, 1f, prim.Scale)

View File

@ -54,10 +54,10 @@ public abstract class BSShape
{ {
BSShape ret = null; BSShape ret = null;
if (prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_AVATAR) if (prim.PreferredPhysicalShape == PhysicsShapeType.SHAPE_CAPSULE)
{ {
// an avatar capsule is close to a native shape (it is not shared) // an avatar capsule is close to a native shape (it is not shared)
ret = BSShapeNative.GetReference(physicsScene, prim, PhysicsShapeType.SHAPE_AVATAR, ret = BSShapeNative.GetReference(physicsScene, prim, PhysicsShapeType.SHAPE_CAPSULE,
FixedShapeKey.KEY_CAPSULE); FixedShapeKey.KEY_CAPSULE);
physicsScene.DetailLog("{0},BSShape.GetShapeReference,avatarCapsule,shape={1}", prim.LocalID, ret); physicsScene.DetailLog("{0},BSShape.GetShapeReference,avatarCapsule,shape={1}", prim.LocalID, ret);
} }
@ -141,7 +141,7 @@ public class BSShapeNative : BSShape
nativeShapeData.HullKey = (ulong)shapeKey; nativeShapeData.HullKey = (ulong)shapeKey;
if (shapeType == PhysicsShapeType.SHAPE_AVATAR) if (shapeType == PhysicsShapeType.SHAPE_CAPSULE)
{ {
ptr = BulletSimAPI.BuildCapsuleShape2(physicsScene.World.ptr, 1f, 1f, prim.Scale); ptr = BulletSimAPI.BuildCapsuleShape2(physicsScene.World.ptr, 1f, 1f, prim.Scale);
physicsScene.DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale); physicsScene.DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale);

View File

@ -181,7 +181,7 @@ public struct ConvexHull
public enum PhysicsShapeType public enum PhysicsShapeType
{ {
SHAPE_UNKNOWN = 0, SHAPE_UNKNOWN = 0,
SHAPE_AVATAR = 1, SHAPE_CAPSULE = 1,
SHAPE_BOX = 2, SHAPE_BOX = 2,
SHAPE_CONE = 3, SHAPE_CONE = 3,
SHAPE_CYLINDER = 4, SHAPE_CYLINDER = 4,