本文整理汇总了C++中FCollisionShape::IsNearlyZero方法的典型用法代码示例。如果您正苦于以下问题:C++ FCollisionShape::IsNearlyZero方法的具体用法?C++ FCollisionShape::IsNearlyZero怎么用?C++ FCollisionShape::IsNearlyZero使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FCollisionShape
的用法示例。
在下文中一共展示了FCollisionShape::IsNearlyZero方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SweepMultiByChannel
bool UWorld::SweepMultiByChannel(TArray<struct FHitResult>& OutHits, const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params /* = FCollisionQueryParams::DefaultQueryParam */, const FCollisionResponseParams& ResponseParam /* = FCollisionResponseParams::DefaultResponseParam */) const
{
if (CollisionShape.IsNearlyZero())
{
return LineTraceMultiByChannel(OutHits, Start, End, TraceChannel, Params, ResponseParam);
}
else
{
#if UE_WITH_PHYSICS
return GeomSweepMulti(this, CollisionShape, Rot, OutHits, Start, End, TraceChannel, Params, ResponseParam, FCollisionObjectQueryParams::DefaultObjectQueryParam);
#else
return false;
#endif
}
}
示例2: SweepTestByChannel
bool UWorld::SweepTestByChannel(const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params /* = FCollisionQueryParams::DefaultQueryParam */, const FCollisionResponseParams& ResponseParam /* = FCollisionResponseParams::DefaultResponseParam */) const
{
if (CollisionShape.IsNearlyZero())
{
// if extent is 0, we'll just do linetrace instead
return LineTraceTestByChannel(Start, End, TraceChannel, Params, ResponseParam);
}
else
{
#if UE_WITH_PHYSICS
return GeomSweepTest(this, CollisionShape, Rot, Start, End, TraceChannel, Params, ResponseParam, FCollisionObjectQueryParams::DefaultObjectQueryParam);
#else
return false;
#endif
}
}
示例3: SweepMultiByObjectType
bool UWorld::SweepMultiByObjectType(TArray<struct FHitResult>& OutHits, const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params /* = FCollisionQueryParams::DefaultQueryParam */) const
{
if (CollisionShape.IsNearlyZero())
{
return LineTraceMultiByObjectType(OutHits, Start, End, ObjectQueryParams, Params);
}
else
{
#if UE_WITH_PHYSICS
GeomSweepMulti(this, CollisionShape, Rot, OutHits, Start, End, DefaultCollisionChannel, Params, FCollisionResponseParams::DefaultResponseParam, ObjectQueryParams);
// object query returns true if any hit is found, not only blocking hit
return (OutHits.Num() > 0);
#else
return false;
#endif
}
}
示例4: SweepSingleByObjectType
bool UWorld::SweepSingleByObjectType(struct FHitResult& OutHit, const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params /* = FCollisionQueryParams::DefaultQueryParam */) const
{
if (CollisionShape.IsNearlyZero())
{
return LineTraceSingleByObjectType(OutHit, Start, End, ObjectQueryParams, Params);
}
else
{
#if UE_WITH_PHYSICS
return GeomSweepSingle(this, CollisionShape, Rot, OutHit, Start, End, DefaultCollisionChannel, Params, FCollisionResponseParams::DefaultResponseParam, ObjectQueryParams);
#else
OutHit.TraceStart = Start;
OutHit.TraceEnd = End;
return false;
#endif
}
}