Universe.Physics.BulletSPlugin.BSAPIUnman.SetCollisionShape C# (CSharp) Method

SetCollisionShape() public method

public SetCollisionShape ( BulletWorld world, BulletBody obj, BulletShape shape ) : void
world BulletWorld
obj BulletBody
shape BulletShape
return void
        public override void SetCollisionShape(BulletWorld world, BulletBody obj, BulletShape shape)
        {
            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);
            }
        }
BSAPIUnman