Exemplo n.º 1
0
        /// <summary>
        /// Adds the cylinder shape.
        /// </summary>
        /// <param name="halfExtentsX">The half extents x.</param>
        /// <param name="halfExtentsY">The half extents y.</param>
        /// <param name="halfExtentsZ">The half extents z.</param>
        /// <returns></returns>
        public ICylinderShapeImp AddCylinderShape(float halfExtentsX, float halfExtentsY, float halfExtentsZ)
        {
            var btCylinderShape = new CylinderShape(halfExtentsX, halfExtentsY, halfExtentsZ);

            BtCollisionShapes.Add(btCylinderShape);

            var retval = new CylinderShapeImp();

            retval.BtCylinderShape     = btCylinderShape;
            btCylinderShape.UserObject = retval;
            return(retval);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds the cylinder shape.
        /// </summary>
        /// <param name="halfExtents">The half extents.</param>
        /// <returns></returns>
        public ICylinderShapeImp AddCylinderShape(float3 halfExtents)
        {
            var btCylinderShape = new CylinderShape(Translator.Float3ToBtVector3(halfExtents));

            BtCollisionShapes.Add(btCylinderShape);

            var retval = new CylinderShapeImp();

            retval.BtCylinderShape     = btCylinderShape;
            btCylinderShape.UserObject = retval;
            return(retval);
        }