UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::AI Namespace Reference

Namespaces

namespace  EQS
 

Functions

TOptional< floatGetYawFromVector (const FVector &Vector)
 
TOptional< floatGetYawFromRotator (const FRotator &Rotator)
 
TOptional< floatGetYawFromQuaternion (const FQuat &Quaternion)
 
void GetActorClassDefaultComponents (const TSubclassOf< AActor > &ActorClass, TArray< UActorComponent * > &OutComponents, const TSubclassOf< UActorComponent > &InComponentClass)
 
bool IntersectSegmentPoly2D (const FVector &Start, const FVector &End, TConstArrayView< FVector > Poly, FVector2D::FReal &OutTMin, FVector2D::FReal &OutTMax, int32 &OutSegMin, int32 &OutSegMax)
 
FVector2D InvBilinear2D (const FVector Point, const FVector VertexA, const FVector VertexB, const FVector VertexC, const FVector VertexD)
 
FVector::FReal Cross2D (const FVector &A, const FVector &B)
 
FVector2D::FReal Cross2D (const FVector2D &A, const FVector2D &B)
 
FVector::FReal TriArea2D (const FVector &A, const FVector &B, const FVector &C)
 
FVector2D::FReal TriArea2D (const FVector2D &A, const FVector2D &B, const FVector2D &C)
 
FVector2D::FReal ProjectPointOnSegment2D (const FVector Point, const FVector Start, const FVector End)
 
FVector::FReal ProjectPointOnLine2D (const FVector Point, const FVector Start, const FVector End)
 
FVector::FReal SignedDistancePointLine2D (const FVector Point, const FVector Start, const FVector End)
 
bool IntersectLineLine2D (const FVector &StartA, const FVector &EndA, const FVector &StartB, const FVector &EndB, FVector2D::FReal &OutTA, FVector2D::FReal &OutTB)
 
FVector Bilinear (const FVector2D UV, const FVector VertexA, const FVector VertexB, const FVector VertexC, const FVector VertexD)
 
FVector2D InvBilinear2DClamped (const FVector Point, const FVector VertexA, const FVector VertexB, const FVector VertexC, const FVector VertexD)
 

Function Documentation

◆ Bilinear()

FVector UE::AI::Bilinear ( const FVector2D  UV,
const FVector  VertexA,
const FVector  VertexB,
const FVector  VertexC,
const FVector  VertexD 
)
inline

Interpolates bilinear patch A,B,C,D. U interpolates from A->B, and C->D, and V interpolates from AB->CD.

Parameters
UVinterpolation coordinates [0..1] range
VertexAfirst corner
VertexBsecond corner
VertexCthird corner
VertexDfourth corner
Returns
interpolated value.

◆ Cross2D() [1/2]

FVector::FReal UE::AI::Cross2D ( const FVector A,
const FVector B 
)
inline
Returns
2D cross product. Using X and Y components of 3D vectors.

◆ Cross2D() [2/2]

FVector2D::FReal UE::AI::Cross2D ( const FVector2D A,
const FVector2D B 
)
inline
Returns
2D cross product.

◆ GetActorClassDefaultComponents()

AIMODULE_API void UE::AI::GetActorClassDefaultComponents ( const TSubclassOf< AActor > &  ActorClass,
TArray< UActorComponent * > &  OutComponents,
const TSubclassOf< UActorComponent > &  InComponentClass 
)

◆ GetYawFromQuaternion()

AIMODULE_API TOptional< float > UE::AI::GetYawFromQuaternion ( const FQuat Quaternion)

This method will extract the yaw radian from the specified quaternion if it is not possible to compute yaw, the function will not return an invalid value

◆ GetYawFromRotator()

AIMODULE_API TOptional< float > UE::AI::GetYawFromRotator ( const FRotator Rotator)

This method will extract the yaw radian from the specified rotator if it is not possible to compute yaw, the function will not return an invalid value

◆ GetYawFromVector()

AIMODULE_API TOptional< float > UE::AI::GetYawFromVector ( const FVector Vector)

This method will extract the yaw radian from the specified vector (The vector does not need to be normalized) if it is not possible to compute yaw, the function will return an invalid value *

◆ IntersectLineLine2D()

bool UE::AI::IntersectLineLine2D ( const FVector StartA,
const FVector EndA,
const FVector StartB,
const FVector EndB,
FVector2D::FReal OutTA,
FVector2D::FReal OutTB 
)
inline

Intersects infinite lines defined by segments A and B in 2D. Using X and Y components of 3D vectors.

Parameters
StartAstart point of segment A
EndAend point of segment A
StartBstart point of segment B
EndBend point of segment B
OutTAintersection value along segment A
OutTBintersection value along segment B
Returns
if segments A and B intersect in 2D

◆ IntersectSegmentPoly2D()

AIMODULE_API bool UE::AI::IntersectSegmentPoly2D ( const FVector Start,
const FVector End,
TConstArrayView< FVector Poly,
FVector2D::FReal OutTMin,
FVector2D::FReal OutTMax,
int32 OutSegMin,
int32 OutSegMax 
)

Calculates intersection of segment Start-End with convex polygon Poly in 2D. Using X and Y components of 3D vectors.

Parameters
Startstart point of the segment
Endend point of the segment
Polyconvex polygon
OutTMinvalue along the segment of the first intersection point [0..1]
OutTMaxvalue along the segment of the second intersection point [0..1]
OutSegMinindex of the polygon segment of the first intersection point
OutSegMaxindex of the polygon segment of the second intersection point
Returns
true if the segment inside or intersects with the polygon.

◆ InvBilinear2D()

AIMODULE_API FVector2D UE::AI::InvBilinear2D ( const FVector  Point,
const FVector  VertexA,
const FVector  VertexB,
const FVector  VertexC,
const FVector  VertexD 
)

Finds the UV coordinates of the 'Point' on bilinear patch A,B,C,D. U interpolates from A->B, and C->D, and V interpolates from AB->CD.

Parameters
Pointlocation inside or close to the bilinear patch
VertexAfirst corner
VertexBsecond corner
VertexCthird corner
VertexDfourth corner
Returns
UV interpolation coordinates of the 'Point'.

◆ InvBilinear2DClamped()

FVector2D UE::AI::InvBilinear2DClamped ( const FVector  Point,
const FVector  VertexA,
const FVector  VertexB,
const FVector  VertexC,
const FVector  VertexD 
)
inline

Finds the UV coordinates of the 'Point' on bilinear patch A,B,C,D. U interpolates from A->B, and C->D, and V interpolates from AB->CD. The UV coordinate is clamped to [0..1] range after inversion.

Parameters
Pointlocation inside or close to the bilinear patch
VertexAfirst corner
VertexBsecond corner
VertexCthird corner
VertexDfourth corner
Returns
UV interpolation coordinates of the 'Point' in [0..1] range.

◆ ProjectPointOnLine2D()

FVector::FReal UE::AI::ProjectPointOnLine2D ( const FVector  Point,
const FVector  Start,
const FVector  End 
)
inline
Returns
value of the 'Point' project on infinite line defined by segment 'Start-End'. Using X and Y components of 3D vectors.

◆ ProjectPointOnSegment2D()

FVector2D::FReal UE::AI::ProjectPointOnSegment2D ( const FVector  Point,
const FVector  Start,
const FVector  End 
)
inline
Returns
value in range [0..1] of the 'Point' project on segment 'Start-End'. Using X and Y components of 3D vectors.

◆ SignedDistancePointLine2D()

FVector::FReal UE::AI::SignedDistancePointLine2D ( const FVector  Point,
const FVector  Start,
const FVector  End 
)
inline
Returns
signed distance of the 'Point' to infinite line defined by segment 'Start-End'. Using X and Y components of 3D vectors.

◆ TriArea2D() [1/2]

FVector::FReal UE::AI::TriArea2D ( const FVector A,
const FVector B,
const FVector C 
)
inline
Returns
2D area of triangle. Using X and Y components of 3D vectors.

◆ TriArea2D() [2/2]

FVector2D::FReal UE::AI::TriArea2D ( const FVector2D A,
const FVector2D B,
const FVector2D C 
)
inline
Returns
2D area of triangle.