本文整理汇总了C++中IEntity::GetLocalTM方法的典型用法代码示例。如果您正苦于以下问题:C++ IEntity::GetLocalTM方法的具体用法?C++ IEntity::GetLocalTM怎么用?C++ IEntity::GetLocalTM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEntity
的用法示例。
在下文中一共展示了IEntity::GetLocalTM方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWorldPosGoal
//------------------------------------------------------------------------
Vec3 CVehicleViewFirstPerson::GetWorldPosGoal()
{
Vec3 vehiclePos;
if (m_pHelper)
{
vehiclePos = m_pHelper->GetVehicleSpaceTranslation();
}
else if(!m_sCharacterBoneName.empty())
{
Vec3 bonePos;
IEntity* pEntity = gEnv->pEntitySystem->GetEntity(m_pSeat->GetPassenger());
ICharacterInstance* pCharacter = pEntity ? pEntity->GetCharacter(0) : NULL;
if(pCharacter)
{
IDefaultSkeleton& rIDefaultSkeleton = pCharacter->GetIDefaultSkeleton();
uint32 id = rIDefaultSkeleton.GetJointIDByName(m_sCharacterBoneName);
uint32 numJoints = rIDefaultSkeleton.GetJointCount();
if(numJoints > id)
{
bonePos = pCharacter->GetISkeletonPose()->GetAbsJointByID(id).t;
}
}
vehiclePos = pEntity ? pEntity->GetWorldTM() * bonePos : Vec3(0,0,0);
return vehiclePos;
}
else
{
IActor* pActor = CCryAction::GetCryAction()->GetIActorSystem()->GetActor(m_passengerId);
CRY_ASSERT(pActor);
vehiclePos = pActor->GetLocalEyePos() + m_offset;
IEntity* pActorEntity = pActor->GetEntity();
const Matrix34& slotTM = pActorEntity->GetSlotLocalTM(0, false);
vehiclePos = pActorEntity->GetLocalTM() * slotTM * vehiclePos;
}
return m_pVehicle->GetEntity()->GetWorldTM() * vehiclePos;
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:42,代码来源:VehicleViewFirstPerson.cpp