コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: DynamicWorld.cs プロジェクト: reliefpfeiler42/Fusee
        public BoxShape AddBoxShape(float3 boxHalfExtents)
        {
            IBoxShapeImp iBoxShapeImp = _dwi.AddBoxShape(boxHalfExtents);
            var          retval       = new BoxShape();

            retval._boxShapeImp     = iBoxShapeImp;
            iBoxShapeImp.UserObject = retval;
            return(retval);
        }
コード例 #3
0
        /// <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);
        }