本文整理汇总了C++中FCollisionShape::GetExtent方法的典型用法代码示例。如果您正苦于以下问题:C++ FCollisionShape::GetExtent方法的具体用法?C++ FCollisionShape::GetExtent怎么用?C++ FCollisionShape::GetExtent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FCollisionShape
的用法示例。
在下文中一共展示了FCollisionShape::GetExtent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SweepComponent
bool UDestructibleComponent::SweepComponent(FHitResult& OutHit, const FVector Start, const FVector End, const FCollisionShape &CollisionShape, bool bTraceComplex/*=false*/)
{
bool bHaveHit = false;
#if WITH_APEX
if (ApexDestructibleActor != NULL)
{
PxF32 HitTime = 0.0f;
PxVec3 HitNormal;
int32 ChunkIdx = ApexDestructibleActor->obbSweep(HitTime, HitNormal, U2PVector(Start), U2PVector(CollisionShape.GetExtent()), PxMat33::createIdentity(), U2PVector(End - Start), NxDestructibleActorRaycastFlags::AllChunks);
if (ChunkIdx != NxModuleDestructibleConst::INVALID_CHUNK_INDEX && HitTime <= 1.0f)
{
PxRigidDynamic* PActor = ApexDestructibleActor->getChunkPhysXActor(ChunkIdx);
if (PActor != NULL)
{
// Store body instance state
FFakeBodyInstanceState PrevState;
SetupFakeBodyInstance(PActor, ChunkIdx, &PrevState);
bHaveHit = Super::SweepComponent(OutHit, Start, End, CollisionShape, bTraceComplex);
// Reset original body instance
ResetFakeBodyInstance(PrevState);
}
}
}
#endif
return bHaveHit;
}