public void AddChildShape(float4x4 localTransform, IBoxShapeImp shape) { Debug.WriteLine("AddBox"); var btHalfExtents = Translater.Float3ToBtVector3(shape.HalfExtents); var btChildShape = new BoxShape(btHalfExtents); var btLocalTransform = Translater.Float4X4ToBtMatrix(localTransform); BtCompoundShape.AddChildShape(btLocalTransform, btChildShape); }
public BoxShape AddBoxShape(float3 boxHalfExtents) { IBoxShapeImp iBoxShapeImp = _dwi.AddBoxShape(boxHalfExtents); var retval = new BoxShape(); retval._boxShapeImp = iBoxShapeImp; iBoxShapeImp.UserObject = retval; return(retval); }
/// <summary> /// Adds a child shape. /// </summary> /// <param name="localTransform">The local transform.</param> /// <param name="shape">The shape.</param> public void AddChildShape(float4x4 localTransform, IBoxShapeImp shape) { Debug.WriteLine("AddBox"); var btHalfExtents = Translator.Float3ToBtVector3(shape.HalfExtents); var btChildShape = new BoxShape(btHalfExtents); var btLocalTransform = Translator.Float4X4ToBtMatrix(localTransform); BtCompoundShape.AddChildShape(btLocalTransform, btChildShape); }