37 template<
typename RealType>
103 template<
typename RealType>
108 RealType SphereRadius)
132 template<
typename RealType>
137 RealType SphereRadius,
157 RealType root = FMath::Sqrt(
discr);
176 template<
typename RealType>
181 RealType SphereRadius)
193 template<
typename RealType>
198 RealType SphereRadius)
231 template<
typename RealType>
236 RealType SphereRadius,
243 if (Result.intersects)
248 if (Result.parameter.Max < 0)
250 Result.intersects =
false;
251 Result.numIntersections = 0;
253 else if (Result.parameter.Min < 0)
255 Result.numIntersections--;
256 Result.parameter.Min = Result.parameter.Max;
259 return Result.intersects;
262 template<
typename RealType>
267 RealType SphereRadius)
278 template <
typename RealType>
283 RealType CircleRadius,
291 Result.intersects =
false;
292 Result.numIntersections = 0;
301 Result.intersects =
false;
302 Result.numIntersections = 0;
312 Result.intersects =
true;
313 Result.numIntersections = 1;
314 Result.parameter.Min = Result.parameter.Max = Param;
318 Result.intersects =
false;
319 Result.numIntersections = 0;
322 return Result.intersects;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition MathUtil.h:150
Definition IntersectionUtil.h:33
bool RayTriangleTest(const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2)
Definition IntersectionUtil.h:38
bool RaySphereTest(const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
Definition IntersectionUtil.h:194
bool LineSphereIntersection(const TVector< RealType > &LineOrigin, const TVector< RealType > &LineDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius, FLinearIntersection &ResultOut)
Definition IntersectionUtil.h:133
bool RayCircleIntersection(const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &CircleCenter, RealType CircleRadius, const TVector< RealType > &CircleNormal, FLinearIntersection &Result)
Definition IntersectionUtil.h:279
bool LineSphereTest(const TVector< RealType > &LineOrigin, const TVector< RealType > &LineDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius)
Definition IntersectionUtil.h:104
bool RaySphereIntersection(const TVector< RealType > &RayOrigin, const TVector< RealType > &RayDirection, const TVector< RealType > &SphereCenter, RealType SphereRadius, FLinearIntersection &Result)
Definition IntersectionUtil.h:232
Definition ParametricSurfaceData.h:18
Definition AdvancedWidgetsModule.cpp:13
static FReal RayPlaneIntersectionParam(const UE::Math::TVector< FReal > &RayOrigin, const UE::Math::TVector< FReal > &RayDirection, const UE::Math::TPlane< FReal > &Plane)
static UE_FORCEINLINE_HINT bool IsNearlyZero(float Value, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:407
Definition IntersectionUtil.h:18
bool intersects
Definition IntersectionUtil.h:19
int numIntersections
Definition IntersectionUtil.h:20
FInterval1d parameter
Definition IntersectionUtil.h:21
UE_FORCEINLINE_HINT TVector< T > Cross(const TVector< T > &V2) const
Definition Vector.h:1535
T SquaredLength() const
Definition Vector.h:1734
UE_FORCEINLINE_HINT T Dot(const TVector< T > &V) const
Definition Vector.h:1553