From 0662d109c2954c7be5f5e9400b1f4afdeab2c298 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 1 Jan 2013 09:32:21 -0800 Subject: BulletSim: fix line endings. --- OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index 2c0cb43..9d8f60d 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs @@ -55,10 +55,10 @@ private sealed class BulletBodyUnman : BulletBody : base(id) { ptr = xx; - } - public override bool HasPhysicalBody - { - get { return ptr != IntPtr.Zero; } + } + public override bool HasPhysicalBody + { + get { return ptr != IntPtr.Zero; } } public override void Clear() { @@ -79,10 +79,10 @@ private sealed class BulletShapeUnman : BulletShape ptr = xx; type = typ; } - public override bool HasPhysicalShape - { - get { return ptr != IntPtr.Zero; } - } + public override bool HasPhysicalShape + { + get { return ptr != IntPtr.Zero; } + } public override void Clear() { ptr = IntPtr.Zero; @@ -202,7 +202,7 @@ public override int PhysicsStep(BulletWorld world, float timeStep, int maxSubSte public override void Shutdown(BulletWorld world) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BSAPICPP.Shutdown2(worldu.ptr); } @@ -249,7 +249,7 @@ public override BulletShape BuildHullShapeFromMesh(BulletWorld world, BulletShap public override BulletShape BuildNativeShape(BulletWorld world, ShapeData shapeData) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; return new BulletShapeUnman(BSAPICPP.BuildNativeShape2(worldu.ptr, shapeData), shapeData.Type); } @@ -334,7 +334,7 @@ public override BulletShape DuplicateCollisionShape(BulletWorld world, BulletSha public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletShapeUnman shapeu = shape as BulletShapeUnman; return BSAPICPP.DeleteCollisionShape2(worldu.ptr, shapeu.ptr); } @@ -360,7 +360,7 @@ public override BulletBody CreateBodyWithDefaultMotionState(BulletShape shape, u public override BulletBody CreateGhostFromShape(BulletWorld world, BulletShape shape, uint id, Vector3 pos, Quaternion rot) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletShapeUnman shapeu = shape as BulletShapeUnman; return new BulletBodyUnman(id, BSAPICPP.CreateGhostFromShape2(worldu.ptr, shapeu.ptr, id, pos, rot)); } @@ -393,7 +393,7 @@ public override BulletConstraint Create6DofConstraint(BulletWorld world, BulletB Vector3 frame2loc, Quaternion frame2rot, bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; return new BulletConstraintUnman(BSAPICPP.Create6DofConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, frame1loc, frame1rot, @@ -404,7 +404,7 @@ public override BulletConstraint Create6DofConstraintToPoint(BulletWorld world, Vector3 joinPoint, bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; return new BulletConstraintUnman(BSAPICPP.Create6DofConstraintToPoint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, @@ -416,7 +416,7 @@ public override BulletConstraint CreateHingeConstraint(BulletWorld world, Bullet Vector3 axisInA, Vector3 axisInB, bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; return new BulletConstraintUnman(BSAPICPP.CreateHingeConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, @@ -494,7 +494,7 @@ public override bool DestroyConstraint(BulletWorld world, BulletConstraint const // ===================================================================================== // btCollisionWorld entries public override void UpdateSingleAabb(BulletWorld world, BulletBody obj) -{ +{ BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu = obj as BulletBodyUnman; BSAPICPP.UpdateSingleAabb2(worldu.ptr, bodyu.ptr); @@ -502,19 +502,19 @@ public override void UpdateSingleAabb(BulletWorld world, BulletBody obj) public override void UpdateAabbs(BulletWorld world) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BSAPICPP.UpdateAabbs2(worldu.ptr); } public override bool GetForceUpdateAllAabbs(BulletWorld world) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; return BSAPICPP.GetForceUpdateAllAabbs2(worldu.ptr); } public override void SetForceUpdateAllAabbs(BulletWorld world, bool force) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BSAPICPP.SetForceUpdateAllAabbs2(worldu.ptr, force); } @@ -522,28 +522,28 @@ public override void SetForceUpdateAllAabbs(BulletWorld world, bool force) // btDynamicsWorld entries public override bool AddObjectToWorld(BulletWorld world, BulletBody obj) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu = obj as BulletBodyUnman; return BSAPICPP.AddObjectToWorld2(worldu.ptr, bodyu.ptr); } public override bool RemoveObjectFromWorld(BulletWorld world, BulletBody obj) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu = obj as BulletBodyUnman; return BSAPICPP.RemoveObjectFromWorld2(worldu.ptr, bodyu.ptr); } public override bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; return BSAPICPP.AddConstraintToWorld2(worldu.ptr, constrainu.ptr, disableCollisionsBetweenLinkedObjects); } public override bool RemoveConstraintFromWorld(BulletWorld world, BulletConstraint constrain) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; return BSAPICPP.RemoveConstraintFromWorld2(worldu.ptr, constrainu.ptr); } @@ -605,16 +605,16 @@ public override bool HasContactResponse(BulletBody obj) public override void SetCollisionShape(BulletWorld world, BulletBody obj, BulletShape shape) { - BulletWorldUnman worldu = world as BulletWorldUnman; + BulletWorldUnman worldu = world as BulletWorldUnman; BulletBodyUnman bodyu = obj as BulletBodyUnman; - BulletShapeUnman shapeu = shape as BulletShapeUnman; - if (worldu != null && bodyu != null) - { - // Special case to allow the caller to zero out the reference to any physical shape - if (shapeu != null) - BSAPICPP.SetCollisionShape2(worldu.ptr, bodyu.ptr, shapeu.ptr); - else - BSAPICPP.SetCollisionShape2(worldu.ptr, bodyu.ptr, IntPtr.Zero); + BulletShapeUnman shapeu = shape as BulletShapeUnman; + if (worldu != null && bodyu != null) + { + // Special case to allow the caller to zero out the reference to any physical shape + if (shapeu != null) + BSAPICPP.SetCollisionShape2(worldu.ptr, bodyu.ptr, shapeu.ptr); + else + BSAPICPP.SetCollisionShape2(worldu.ptr, bodyu.ptr, IntPtr.Zero); } } -- cgit v1.1