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

#include <BoxElem.h>

+ Inheritance diagram for FKBoxElem:

Public Member Functions

 FKBoxElem ()
 
 FKBoxElem (float s)
 
 FKBoxElem (float InX, float InY, float InZ)
 
virtual ENGINE_API ~FKBoxElem ()
 
virtual FTransform GetTransform () const override final
 
void SetTransform (const FTransform &InTransform)
 
FVector::FReal GetVolume (const FVector &Scale3D) const
 
FVector::FReal GetScaledVolume (const FVector &Scale3D) const
 
ENGINE_API void DrawElemWire (class FPrimitiveDrawInterface *PDI, const FTransform &ElemTM, float Scale, const FColor Color) const override
 
ENGINE_API void DrawElemSolid (class FPrimitiveDrawInterface *PDI, const FTransform &ElemTM, float Scale, const FMaterialRenderProxy *MaterialRenderProxy) const override
 
ENGINE_API void DrawElemWire (class FPrimitiveDrawInterface *PDI, const FTransform &ElemTM, const FVector &Scale3D, const FColor Color) const
 
ENGINE_API void DrawElemSolid (class FPrimitiveDrawInterface *PDI, const FTransform &ElemTM, const FVector &Scale3D, const FMaterialRenderProxy *MaterialRenderProxy) const
 
ENGINE_API void GetElemSolid (const FTransform &ElemTM, const FVector &Scale3D, const FMaterialRenderProxy *MaterialRenderProxy, int32 ViewIndex, FMeshElementCollector &Collector) const
 
ENGINE_API FBox CalcAABB (const FTransform &BoneTM, float Scale) const
 
ENGINE_API void ScaleElem (FVector DeltaSize, float MinSize)
 
ENGINE_API FKBoxElem GetFinalScaled (const FVector &Scale3D, const FTransform &RelativeTM) const
 
ENGINE_API float GetShortestDistanceToPoint (const FVector &WorldPosition, const FTransform &BodyToWorldTM) const
 
ENGINE_API float GetClosestPointAndNormal (const FVector &WorldPosition, const FTransform &BodyToWorldTM, FVector &ClosestWorldPosition, FVector &Normal) const
 
- Public Member Functions inherited from FKShapeElem
 FKShapeElem ()
 
 FKShapeElem (EAggCollisionShape::Type InShapeType)
 
 FKShapeElem (const FKShapeElem &Copy)
 
virtual ENGINE_API ~FKShapeElem ()
 
const FKShapeElemoperator= (const FKShapeElem &Other)
 
template<typename T >
T * GetShapeCheck ()
 
const FUserDataGetUserData () const
 
const FNameGetName () const
 
void SetName (const FName &InName)
 
EAggCollisionShape::Type GetShapeType () const
 
bool GetContributeToMass () const
 
void SetContributeToMass (bool bInContributeToMass)
 
void SetCollisionEnabled (ECollisionEnabled::Type InCollisionEnabled)
 
ECollisionEnabled::Type GetCollisionEnabled () const
 
virtual void DrawElemSolid (class FPrimitiveDrawInterface *PDI, const FTransform &ElemTM, const float Scale, const class FMaterialRenderProxy *MaterialRenderProxy) const
 

Public Attributes

FVector Center
 
FRotator Rotation
 
float X
 
float Y
 
float Z
 
- Public Attributes inherited from FKShapeElem
float RestOffset
 

Static Public Attributes

static ENGINE_API EAggCollisionShape::Type StaticShapeType = EAggCollisionShape::Box
 
- Static Public Attributes inherited from FKShapeElem
static ENGINE_API EAggCollisionShape::Type StaticShapeType = EAggCollisionShape::Unknown
 

Friends

bool operator== (const FKBoxElem &LHS, const FKBoxElem &RHS)
 

Additional Inherited Members

- Protected Member Functions inherited from FKShapeElem
void CloneElem (const FKShapeElem &Other)
 

Detailed Description

Box shape used for collision

Constructor & Destructor Documentation

◆ FKBoxElem() [1/3]

FKBoxElem::FKBoxElem ( )
inline

◆ FKBoxElem() [2/3]

FKBoxElem::FKBoxElem ( float  s)
inline

◆ FKBoxElem() [3/3]

FKBoxElem::FKBoxElem ( float  InX,
float  InY,
float  InZ 
)
inline

◆ ~FKBoxElem()

FKBoxElem::~FKBoxElem ( )
virtualdefault

Member Function Documentation

◆ CalcAABB()

FBox FKBoxElem::CalcAABB ( const FTransform BoneTM,
float  Scale 
) const

◆ DrawElemSolid() [1/2]

void FKBoxElem::DrawElemSolid ( class FPrimitiveDrawInterface PDI,
const FTransform ElemTM,
const FVector Scale3D,
const FMaterialRenderProxy MaterialRenderProxy 
) const

◆ DrawElemSolid() [2/2]

void FKBoxElem::DrawElemSolid ( class FPrimitiveDrawInterface PDI,
const FTransform ElemTM,
float  Scale,
const FMaterialRenderProxy MaterialRenderProxy 
) const
override

◆ DrawElemWire() [1/2]

void FKBoxElem::DrawElemWire ( class FPrimitiveDrawInterface PDI,
const FTransform ElemTM,
const FVector Scale3D,
const FColor  Color 
) const

◆ DrawElemWire() [2/2]

void FKBoxElem::DrawElemWire ( class FPrimitiveDrawInterface PDI,
const FTransform ElemTM,
float  Scale,
const FColor  Color 
) const
overridevirtual

Reimplemented from FKShapeElem.

◆ GetClosestPointAndNormal()

float FKBoxElem::GetClosestPointAndNormal ( const FVector WorldPosition,
const FTransform BodyToWorldTM,
FVector ClosestWorldPosition,
FVector Normal 
) const

Finds the closest point on the shape given a world position. Input and output are given in world space

Parameters
WorldPositionThe point we are trying to get close to
BodyToWorldTMThe transform to convert BodySetup into world space
ClosestWorldPositionThe closest point on the shape in world space
NormalThe normal of the feature associated with ClosestWorldPosition.
Returns
The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside the shape.

◆ GetElemSolid()

void FKBoxElem::GetElemSolid ( const FTransform ElemTM,
const FVector Scale3D,
const FMaterialRenderProxy MaterialRenderProxy,
int32  ViewIndex,
FMeshElementCollector Collector 
) const

◆ GetFinalScaled()

FKBoxElem FKBoxElem::GetFinalScaled ( const FVector Scale3D,
const FTransform RelativeTM 
) const

◆ GetScaledVolume()

FVector::FReal FKBoxElem::GetScaledVolume ( const FVector Scale3D) const
inline

◆ GetShortestDistanceToPoint()

float FKBoxElem::GetShortestDistanceToPoint ( const FVector WorldPosition,
const FTransform BodyToWorldTM 
) const

Finds the shortest distance between the element and a world position. Input and output are given in world space

Parameters
WorldPositionThe point we are trying to get close to
BodyToWorldTMThe transform to convert BodySetup into world space
Returns
The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside one of the shapes.

◆ GetTransform()

virtual FTransform FKBoxElem::GetTransform ( ) const
inlinefinaloverridevirtual

Reimplemented from FKShapeElem.

◆ GetVolume()

FVector::FReal FKBoxElem::GetVolume ( const FVector Scale3D) const
inline

◆ ScaleElem()

void FKBoxElem::ScaleElem ( FVector  DeltaSize,
float  MinSize 
)

◆ SetTransform()

void FKBoxElem::SetTransform ( const FTransform InTransform)
inline

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const FKBoxElem LHS,
const FKBoxElem RHS 
)
friend

Member Data Documentation

◆ Center

FVector FKBoxElem::Center

Position of the box's origin

◆ Rotation

FRotator FKBoxElem::Rotation

Rotation of the box

◆ StaticShapeType

EAggCollisionShape::Type FKBoxElem::StaticShapeType = EAggCollisionShape::Box
static

◆ X

float FKBoxElem::X

Extent of the box along the x-axis

◆ Y

float FKBoxElem::Y

Extent of the box along the y-axis

◆ Z

float FKBoxElem::Z

Extent of the box along the z-axis


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