本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}