/// <summary> /// Adds the box shape. /// </summary> /// <param name="boxHalfExtentsX">The box half extents x.</param> /// <param name="boxHalfExtentsY">The box half extents y.</param> /// <param name="boxHalfExtentsZ">The box half extents z.</param> /// <returns></returns> public IBoxShapeImp AddBoxShape(float boxHalfExtentsX, float boxHalfExtentsY, float boxHalfExtentsZ) { var btBoxShape = new BoxShape(boxHalfExtentsX, boxHalfExtentsY, boxHalfExtentsZ); BtCollisionShapes.Add(btBoxShape); var retval = new BoxShapeImp(); retval.BtBoxShape = btBoxShape; btBoxShape.UserObject = retval; return(retval); }
/// <summary> /// Adds the box shape. /// </summary> /// <param name="boxHalfExtents">The box half extents.</param> /// <returns></returns> public IBoxShapeImp AddBoxShape(float3 boxHalfExtents) { var btBoxShape = new BoxShape(Translator.Float3ToBtVector3(boxHalfExtents)); BtCollisionShapes.Add(btBoxShape); var retval = new BoxShapeImp(); retval.BtBoxShape = btBoxShape; btBoxShape.UserObject = retval; return(retval); }