當前位置: 首頁>>代碼示例>>C#>>正文


C# BulletSPlugin.BulletShape類代碼示例

本文整理匯總了C#中WhiteCore.Region.Physics.BulletSPlugin.BulletShape的典型用法代碼示例。如果您正苦於以下問題:C# BulletShape類的具體用法?C# BulletShape怎麽用?C# BulletShape使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BulletShape類屬於WhiteCore.Region.Physics.BulletSPlugin命名空間,在下文中一共展示了BulletShape類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetContactBreakingThreshold

 public override float GetContactBreakingThreshold(BulletShape pShape, float defaultFactor)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return shape.GetContactBreakingThreshold(defaultFactor);
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例2: DeleteCollisionShape

 public override bool DeleteCollisionShape(BulletWorld pWorld, BulletShape pShape)
 {
     //TODO:
     return false;
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例3: CalculateLocalInertia

 public override Vector3 CalculateLocalInertia(BulletShape pShape, float pphysMass)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     IndexedVector3 inertia = IndexedVector3.Zero;
     shape.CalculateLocalInertia(pphysMass, out inertia);
     return new Vector3(inertia.X, inertia.Y, inertia.Z);
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:7,代碼來源:BSAPIXNA.cs

示例4: CreateBodyWithDefaultMotionState

        public override BulletBody CreateBodyWithDefaultMotionState(BulletShape pShape, uint pLocalID,
            Vector3 pRawPosition, Quaternion pRawOrientation)
        {
            IndexedMatrix mat =
                IndexedMatrix.CreateFromQuaternion(new IndexedQuaternion(pRawOrientation.X, pRawOrientation.Y,
                    pRawOrientation.Z, pRawOrientation.W));
            mat._origin = new IndexedVector3(pRawPosition.X, pRawPosition.Y, pRawPosition.Z);

            CollisionShape shape = (pShape as BulletShapeXNA).shape;

            // TODO: Feed Update array into null
            RigidBody body = new RigidBody(0, new DefaultMotionState(mat, IndexedMatrix.Identity), shape,
                IndexedVector3.Zero);
            body.SetWorldTransform(mat);
            body.SetUserPointer(pLocalID);
            return new BulletBodyXNA(pLocalID, body);
        }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:17,代碼來源:BSAPIXNA.cs

示例5: SetShapeCollisionMargin

 public override void SetShapeCollisionMargin(BulletShape pShape, float pMargin)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     shape.SetMargin(pMargin);
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例6: ReferenceSame

 public override bool ReferenceSame(BulletShape other)
 {
     BulletShapeXNA otheru = other as BulletShapeXNA;
     return (otheru != null) && (this.shape == otheru.shape);
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例7: IsInfinite

 public override bool IsInfinite(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return shape.IsInfinite();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例8: IsNativeShape

 public override bool IsNativeShape(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     bool ret;
     switch (shape.GetShapeType())
     {
         case BroadphaseNativeTypes.BOX_SHAPE_PROXYTYPE:
         case BroadphaseNativeTypes.CONE_SHAPE_PROXYTYPE:
         case BroadphaseNativeTypes.SPHERE_SHAPE_PROXYTYPE:
         case BroadphaseNativeTypes.CYLINDER_SHAPE_PROXYTYPE:
             ret = true;
             break;
         default:
             ret = false;
             break;
     }
     return ret;
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:18,代碼來源:BSAPIXNA.cs

示例9: GetShapeType

 public override int GetShapeType(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return (int)shape.GetShapeType();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例10: IsConvex2d

 public override bool IsConvex2d(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return shape.IsConvex2d();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例11: GetNumberOfCompoundChildren

 public override int GetNumberOfCompoundChildren(BulletShape pCompoundShape)
 {
     CompoundShape compoundshape = (pCompoundShape as BulletShapeXNA).shape as CompoundShape;
     return compoundshape.GetNumChildShapes();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例12: GetMargin

 public override float GetMargin(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return shape.GetMargin();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs

示例13: GetLocalScaling

 public override Vector3 GetLocalScaling(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     IndexedVector3 scale = shape.GetLocalScaling();
     return new Vector3(scale.X, scale.Y, scale.Z);
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:6,代碼來源:BSAPIXNA.cs

示例14: AddChildShapeToCompoundShape

        //LinksetRoot.PhysShape.ptr, newShape.ptr, displacementPos, displacementRot
        public override void AddChildShapeToCompoundShape(BulletShape pCShape, BulletShape paddShape,
            Vector3 displacementPos, Quaternion displacementRot)
        {
            IndexedMatrix relativeTransform = new IndexedMatrix();
            CompoundShape compoundshape = (pCShape as BulletShapeXNA).shape as CompoundShape;
            CollisionShape addshape = (paddShape as BulletShapeXNA).shape;

            relativeTransform._origin = new IndexedVector3(displacementPos.X, displacementPos.Y, displacementPos.Z);
            relativeTransform.SetRotation(new IndexedQuaternion(displacementRot.X, displacementRot.Y, displacementRot.Z,
                displacementRot.W));
            compoundshape.AddChildShape(ref relativeTransform, addshape);
        }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:13,代碼來源:BSAPIXNA.cs

示例15: IsNonMoving

 public override bool IsNonMoving(BulletShape pShape)
 {
     CollisionShape shape = (pShape as BulletShapeXNA).shape;
     return shape.IsNonMoving();
 }
開發者ID:QueenStarfinder,項目名稱:WhiteCore-Dev,代碼行數:5,代碼來源:BSAPIXNA.cs


注:本文中的WhiteCore.Region.Physics.BulletSPlugin.BulletShape類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。