当前位置: 首页>>代码示例>>C#>>正文


C# IndexedMatrix.SetRotation方法代码示例

本文整理汇总了C#中BulletXNA.LinearMath.IndexedMatrix.SetRotation方法的典型用法代码示例。如果您正苦于以下问题:C# IndexedMatrix.SetRotation方法的具体用法?C# IndexedMatrix.SetRotation怎么用?C# IndexedMatrix.SetRotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BulletXNA.LinearMath.IndexedMatrix的用法示例。


在下文中一共展示了IndexedMatrix.SetRotation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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:CassieEllen,项目名称:opensim,代码行数:12,代码来源:BSAPIXNA.cs

示例2: AddChildShapeToCompoundShape2

    //LinksetRoot.PhysShape.ptr, newShape.ptr, displacementPos, displacementRot
    internal static void AddChildShapeToCompoundShape2(object pCShape, object paddShape, Vector3 displacementPos, Quaternion displacementRot)
    {
        IndexedMatrix relativeTransform = new IndexedMatrix();
        var compoundshape = pCShape as CompoundShape;
        var addshape = paddShape as CollisionShape;

        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:justasabc,项目名称:opensim75grid,代码行数:12,代码来源:BulletSimAPI.cs

示例3: CreateGhostFromShape

    //sim.ptr, shape.ptr,prim.LocalID, prim.RawPosition, prim.RawOrientation
    public override BulletBody CreateGhostFromShape(BulletWorld pWorld, BulletShape pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation)
    {
        DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
        IndexedMatrix bodyTransform = new IndexedMatrix();
        bodyTransform._origin = new IndexedVector3(pRawPosition.X, pRawPosition.Y, pRawPosition.Z);
        bodyTransform.SetRotation(new IndexedQuaternion(pRawOrientation.X,pRawOrientation.Y,pRawOrientation.Z,pRawOrientation.W));
        GhostObject gObj = new PairCachingGhostObject();
        gObj.SetWorldTransform(bodyTransform);
        CollisionShape shape = (pShape as BulletShapeXNA).shape;
        gObj.SetCollisionShape(shape);
        gObj.SetUserPointer(pLocalID);

        if (specialCollisionObjects.ContainsKey(pLocalID))
            specialCollisionObjects[pLocalID] = gObj;
        else
            specialCollisionObjects.Add(pLocalID, gObj);

        // TODO: Add to Special CollisionObjects!
        return new BulletBodyXNA(pLocalID, gObj);
    }
开发者ID:CassieEllen,项目名称:opensim,代码行数:21,代码来源:BSAPIXNA.cs

示例4: CreateGhostFromShape2

 //sim.ptr, shape.ptr,prim.LocalID, prim.RawPosition, prim.RawOrientation
 internal static object CreateGhostFromShape2(object pWorld, object pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation)
 {
     IndexedMatrix bodyTransform = new IndexedMatrix();
     bodyTransform._origin = new IndexedVector3(pRawPosition.X, pRawPosition.Y, pRawPosition.Z);
     bodyTransform.SetRotation(new IndexedQuaternion(pRawOrientation.X,pRawOrientation.Y,pRawOrientation.Z,pRawOrientation.W));
     GhostObject gObj = new PairCachingGhostObject();
     gObj.SetWorldTransform(bodyTransform);
     CollisionShape shape = pShape as CollisionShape;
     gObj.SetCollisionShape(shape);
     gObj.SetUserPointer(pLocalID);
     // TODO: Add to Special CollisionObjects!
     return gObj;
 }
开发者ID:justasabc,项目名称:opensim75grid,代码行数:14,代码来源:BulletSimAPI.cs


注:本文中的BulletXNA.LinearMath.IndexedMatrix.SetRotation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。