UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FConvexVolume Struct Reference

#include <ConvexVolume.h>

Public Types

typedef TArray< FPlane, TInlineAllocator< 6 > > FPlaneArray
 
typedef TArray< FPlane, TInlineAllocator< 8 > > FPermutedPlaneArray
 

Public Member Functions

 FConvexVolume ()
 
 FConvexVolume (const TArray< FPlane, TInlineAllocator< 6 > > &InPlanes)
 
ENGINE_API void Init (void)
 
ENGINE_API bool ClipPolygon (class FPoly &Polygon) const
 
ENGINE_API FOutcode GetBoxIntersectionOutcode (const FVector &Origin, const FVector &Extent) const
 
ENGINE_API bool IntersectBox (const FVector &Origin, const FVector &Extent) const
 
ENGINE_API bool IntersectBox (const FVector &Origin, const FVector &Extent, bool &bOutFullyContained) const
 
ENGINE_API bool IntersectSphere (const FVector &Origin, const float &Radius) const
 
ENGINE_API bool IntersectSphere (const FVector &Origin, const float &Radius, bool &bOutFullyContained) const
 
ENGINE_API bool IntersectTriangle (const FVector &PointA, const FVector &PointB, const FVector &PointC, bool &bOutFullyContained) const
 
ENGINE_API bool IntersectLineSegment (const FVector &Start, const FVector &End) const
 
ENGINE_API float DistanceTo (const FVector &Point) const
 
ENGINE_API bool IntersectBox (const FVector &Origin, const FVector &Translation, const FVector &Extent) const
 
bool IntersectPoint (const FVector &Point) const
 

Public Attributes

FPlaneArray Planes
 
FPermutedPlaneArray PermutedPlanes
 

Friends

ENGINE_API FArchiveoperator<< (FArchive &Ar, FConvexVolume &ConvexVolume)
 

Member Typedef Documentation

◆ FPermutedPlaneArray

◆ FPlaneArray

Constructor & Destructor Documentation

◆ FConvexVolume() [1/2]

FConvexVolume::FConvexVolume ( )
inline

◆ FConvexVolume() [2/2]

FConvexVolume::FConvexVolume ( const TArray< FPlane, TInlineAllocator< 6 > > &  InPlanes)
inline

Builds the set of planes used to clip against. Also, puts the planes into a form more readily used by SSE/Altivec so 4 planes can be clipped against at once.

Member Function Documentation

◆ ClipPolygon()

bool FConvexVolume::ClipPolygon ( class FPoly Polygon) const

Clips a polygon to the volume.

Parameters
Polygon- The polygon to be clipped. If the true is returned, contains the clipped polygon.
Returns
Returns false if the polygon is entirely outside the volume and true otherwise.

◆ DistanceTo()

float FConvexVolume::DistanceTo ( const FVector Point) const

Calculates the maximum perpendicular distance of a point to the plains of the convex volume. The distance can be used to see if the sphere is touching the volume

Parameters
Pointto calculate the distance to.
Returns
Returns the maximum perpendicular distance to then plains (the distance is conservative at the corners)

◆ GetBoxIntersectionOutcode()

FOutcode FConvexVolume::GetBoxIntersectionOutcode ( const FVector Origin,
const FVector Extent 
) const

◆ Init()

void FConvexVolume::Init ( void  )

Builds the permuted planes for SSE/Altivec fast clipping

Builds the permuted planes for SIMD fast clipping

◆ IntersectBox() [1/3]

bool FConvexVolume::IntersectBox ( const FVector Origin,
const FVector Extent 
) const

Intersection test with a translated axis-aligned box.

Parameters
Originof the box.
Translation-to apply to the box.
Extentof the box along each axis.
Returns
true if this convex volume intersects the given translated box.

◆ IntersectBox() [2/3]

bool FConvexVolume::IntersectBox ( const FVector Origin,
const FVector Extent,
bool bOutFullyContained 
) const

Intersection test with a translated axis-aligned box.

Parameters
Originof the box.
Translation-to apply to the box.
Extentof the box along each axis. param bOutFullyContained to know if the box was fully contained
Returns
true if this convex volume intersects the given translated box.

◆ IntersectBox() [3/3]

bool FConvexVolume::IntersectBox ( const FVector Origin,
const FVector Translation,
const FVector Extent 
) const

Intersection test with a translated axis-aligned box.

Parameters
Origin- Origin of the box.
Translation- Translation to apply to the box.
Extent- Extent of the box along each axis.
Returns
true if this convex volume intersects the given translated box.

◆ IntersectLineSegment()

bool FConvexVolume::IntersectLineSegment ( const FVector Start,
const FVector End 
) const

Intersection test with line segment

Parameters
Startof the segment.
Endof the segment. param bOutFullyContained to know if the sphere was fully contained
Returns
true if this convex volume intersects the given line segment

◆ IntersectPoint()

bool FConvexVolume::IntersectPoint ( const FVector Point) const
inline

Determines whether the given point lies inside the convex volume

Parameters
Pointto test against.
Returns
true if the point is inside the convex volume.

◆ IntersectSphere() [1/2]

bool FConvexVolume::IntersectSphere ( const FVector Origin,
const float Radius 
) const

Intersection test with a sphere

Parameters
Originof the sphere.
Radiusof the sphere.
Returns
true if this convex volume intersects the given sphere (the result is conservative at the corners)

◆ IntersectSphere() [2/2]

bool FConvexVolume::IntersectSphere ( const FVector Origin,
const float Radius,
bool bOutFullyContained 
) const

Intersection test with a sphere

Parameters
Originof the sphere.
Radiusof the sphere. param bOutFullyContained to know if the sphere was fully contained
Returns
true if this convex volume intersects the given sphere (the result is conservative at the corners)

◆ IntersectTriangle()

bool FConvexVolume::IntersectTriangle ( const FVector PointA,
const FVector PointB,
const FVector PointC,
bool bOutFullyContained 
) const

Intersection test with a triangle param bOutFullyContained to know if the triangle was fully contained

Returns
true if this convex volume intersects the given triangle.

Friends And Related Symbol Documentation

◆ operator<<

ENGINE_API FArchive & operator<< ( FArchive Ar,
FConvexVolume ConvexVolume 
)
friend

Serializer

Parameters
ArArchive to serialize data to
ConvexVolumeConvex volumes to serialize to archive
Returns
passed in archive

Serializor

Parameters
ArArchive to serialize data to
ConvexVolumeConvex volumes to serialize to archive
Returns
passed in archive

Member Data Documentation

◆ PermutedPlanes

FPermutedPlaneArray FConvexVolume::PermutedPlanes

This is the set of planes pre-permuted to SSE/Altivec form

◆ Planes

FPlaneArray FConvexVolume::Planes

The documentation for this struct was generated from the following files: