本文整理汇总了C++中Matrix4x4::GetLeftVector方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4x4::GetLeftVector方法的具体用法?C++ Matrix4x4::GetLeftVector怎么用?C++ Matrix4x4::GetLeftVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4x4
的用法示例。
在下文中一共展示了Matrix4x4::GetLeftVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CharacterMovement
void CCharacterController::CharacterMovement(btCollisionWorld* pCollisionWorld, btScalar deltaTime)
{
// Grab the new player transform before doing movement steps in case the player has been moved,
// such as by a platform or teleported. No need to do a physics trace for it, the penetration
// functions should handle that.
btTransform mCharacter;
CPhysicsEntity* pPhysicsEntity = static_cast<CBulletPhysics*>(GamePhysics())->GetPhysicsEntity(m_hEntity);
pPhysicsEntity->m_oMotionState.getWorldTransform(mCharacter);
#ifdef _DEBUG
Matrix4x4 mTest;
mCharacter.getOpenGLMatrix(mTest);
TAssert(mTest.GetForwardVector().Cross(mTest.GetLeftVector()).Equals(mTest.GetUpVector(), 0.001f));
TAssert(mTest.GetUpVector().Equals(m_hEntity->GetUpVector(), 0.001f));
#endif
m_pGhostObject->setWorldTransform(mCharacter);
PreStep(pCollisionWorld);
if (m_hEntity->IsFlying())
PlayerFly(pCollisionWorld, deltaTime);
else if (!m_hEntity->GetGroundEntity())
PlayerFall(pCollisionWorld, deltaTime);
else
PlayerWalk(pCollisionWorld, deltaTime);
FindGround(pCollisionWorld);
btVector3 vecOrigin = m_pGhostObject->getWorldTransform().getOrigin();
TAssert(vecOrigin.x() < 999999);
TAssert(vecOrigin.x() > -999999);
TAssert(vecOrigin.y() < 999999);
TAssert(vecOrigin.y() > -999999);
TAssert(vecOrigin.z() < 999999);
TAssert(vecOrigin.z() > -999999);
if ((mCharacter.getOrigin() - vecOrigin).length2() > 0.0001f)
pPhysicsEntity->m_oMotionState.setWorldTransform(m_pGhostObject->getWorldTransform());
}