UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DistSegment2AxisAlignedBox2.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3// Port of gte's DistSegment2AlignedBox2 to use GeometryCore data types
4
5#pragma once
6
8#include "Math/Box2D.h"
9#include "SegmentTypes.h"
10#include "VectorTypes.h"
11
12namespace UE
13{
14namespace Geometry
15{
16
17using namespace UE::Math;
18
22template <typename Real>
24{
25public:
26 // Input
29
30 // Output
31 Real DistanceSquared = -1.0;
34
38
39 Real Get()
40 {
42 }
44 {
45 return ComputeResult();
46 }
47
82};
83
86
87} // end namespace UE::Geometry
88} // end namespace UE
OODEFFUNC typedef const char int line
Definition oodle2.h:678
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
static RealType Sqrt(const RealType Value)
Definition MathUtil.h:342
Definition DistLine2AxisAlignedBox2.h:24
Definition DistSegment2AxisAlignedBox2.h:24
TDistSegment2AxisAlignedBox2(const TSegment2< Real > &SegmentIn, const TBox2< Real > &AxisAlignedBoxIn)
Definition DistSegment2AxisAlignedBox2.h:35
TSegment2< Real > Segment
Definition DistSegment2AxisAlignedBox2.h:27
Real ComputeResult()
Definition DistSegment2AxisAlignedBox2.h:48
TBox2< Real > AxisAlignedBox
Definition DistSegment2AxisAlignedBox2.h:28
Real DistanceSquared
Definition DistSegment2AxisAlignedBox2.h:31
Real GetSquared()
Definition DistSegment2AxisAlignedBox2.h:43
Real Get()
Definition DistSegment2AxisAlignedBox2.h:39
TVector2< Real > BoxClosest
Definition DistSegment2AxisAlignedBox2.h:33
TVector2< Real > SegmentClosest
Definition DistSegment2AxisAlignedBox2.h:33
Real SegmentParameter
Definition DistSegment2AxisAlignedBox2.h:32
TDistSegment2AxisAlignedBox2< double > FDistSegment2AxisAlignedBox2d
Definition DistSegment2AxisAlignedBox2.h:85
TDistSegment2AxisAlignedBox2< float > FDistSegment2AxisAlignedBox2f
Definition DistSegment2AxisAlignedBox2.h:84
T SquaredLength(const UE::Math::TVector< T > &V)
Definition VectorTypes.h:154
Definition Sphere.cpp:10
Definition AdvancedWidgetsModule.cpp:13
Definition LineTypes.h:23
Definition SegmentTypes.h:23
TVector2< T > EndPoint() const
Definition SegmentTypes.h:85
T Extent
Definition SegmentTypes.h:30
TVector2< T > StartPoint() const
Definition SegmentTypes.h:79
TVector2< T > Direction
Definition SegmentTypes.h:28
TVector2< T > Center
Definition SegmentTypes.h:26
Definition Box2D.h:31
TVector2< T > GetClosestPointTo(const TVector2< T > &Point) const
Definition Box2D.h:548
Definition Vector2D.h:38