本文整理汇总了C#中btVector3.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# btVector3.ToString方法的具体用法?C# btVector3.ToString怎么用?C# btVector3.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类btVector3
的用法示例。
在下文中一共展示了btVector3.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addContactPoint
public override void addContactPoint( ref btVector3 normalOnBInWorld, ref btVector3 pointInWorld, double depth )
{
bool isSwapped = m_manifoldPtr.m_body0 != m_body0Wrap.m_collisionObject;
btVector3 pointA; pointInWorld.AddScale( ref normalOnBInWorld, depth, out pointA );
btVector3 localA;
btVector3 localB;
if( isSwapped )
{
m_body1Wrap.m_collisionObject.m_worldTransform.invXform( ref pointA, out localA );
m_body0Wrap.m_collisionObject.m_worldTransform.invXform( ref pointInWorld, out localB );
}
else
{
m_body0Wrap.m_collisionObject.m_worldTransform.invXform( ref pointA, out localA );
m_body1Wrap.m_collisionObject.m_worldTransform.invXform( ref pointInWorld, out localB );
}
btManifoldPoint newPt = BulletGlobals.ManifoldPointPool.Get();
newPt.Initialize( ref localA, ref localB, ref normalOnBInWorld, depth );
btScalar.Dbg( "2 add contact point " + pointA.ToString() + " and " + pointInWorld.ToString() );
newPt.m_positionWorldOnA = pointA;
newPt.m_positionWorldOnB = pointInWorld;
//BP mod, store contact triangles.
if( isSwapped )
{
newPt.m_partId0 = m_partId1;
newPt.m_partId1 = m_partId0;
newPt.m_index0 = m_index1;
newPt.m_index1 = m_index0;
}
else
{
newPt.m_partId0 = m_partId0;
newPt.m_partId1 = m_partId1;
newPt.m_index0 = m_index0;
newPt.m_index1 = m_index1;
}
//experimental feature info, for per-triangle material etc.
btCollisionObjectWrapper obj0Wrap = isSwapped ? m_body1Wrap : m_body0Wrap;
btCollisionObjectWrapper obj1Wrap = isSwapped ? m_body0Wrap : m_body1Wrap;
m_resultCallback.addSingleResult( newPt, obj0Wrap, newPt.m_partId0, newPt.m_index0, obj1Wrap, newPt.m_partId1, newPt.m_index1 );
}