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

#include <SphylElem.h>

+ Inheritance diagram for FKSphylElem:

Public Member Functions

 FKSphylElem ()
 
 FKSphylElem (float InRadius, float InLength)
 
virtual ENGINE_API ~FKSphylElem ()
 
virtual FTransform GetTransform () const override final
 
void SetTransform (const FTransform &InTransform)
 
FVector::FReal GetVolume (const FVector &Scale) 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 FKSphylElem GetFinalScaled (const FVector &Scale3D, const FTransform &RelativeTM) const
 
ENGINE_API float GetScaledRadius (const FVector &Scale3D) const
 
ENGINE_API float GetScaledCylinderLength (const FVector &Scale3D) const
 
ENGINE_API float GetScaledHalfLength (const FVector &Scale3D) 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 Radius
 
float Length
 
- Public Attributes inherited from FKShapeElem
float RestOffset
 

Static Public Attributes

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

Friends

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

Additional Inherited Members

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

Detailed Description

Capsule shape used for collision. Z axis is capsule axis.

Constructor & Destructor Documentation

◆ FKSphylElem() [1/2]

FKSphylElem::FKSphylElem ( )
inline

◆ FKSphylElem() [2/2]

FKSphylElem::FKSphylElem ( float  InRadius,
float  InLength 
)
inline

◆ ~FKSphylElem()

FKSphylElem::~FKSphylElem ( )
virtualdefault

Member Function Documentation

◆ CalcAABB()

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

◆ DrawElemSolid() [1/2]

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

◆ DrawElemSolid() [2/2]

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

◆ DrawElemWire() [1/2]

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

◆ DrawElemWire() [2/2]

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

Reimplemented from FKShapeElem.

◆ GetClosestPointAndNormal()

float FKSphylElem::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 FKSphylElem::GetElemSolid ( const FTransform ElemTM,
const FVector Scale3D,
const FMaterialRenderProxy MaterialRenderProxy,
int32  ViewIndex,
FMeshElementCollector Collector 
) const

◆ GetFinalScaled()

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

◆ GetScaledCylinderLength()

float FKSphylElem::GetScaledCylinderLength ( const FVector Scale3D) const

Returns the scaled length of the cylinder part of the Sphyl

◆ GetScaledHalfLength()

float FKSphylElem::GetScaledHalfLength ( const FVector Scale3D) const

Returns half of the total scaled length of the Sphyl, which includes the scaled top and bottom caps

◆ GetScaledRadius()

float FKSphylElem::GetScaledRadius ( const FVector Scale3D) const

Returns the scaled radius for this Sphyl, which is determined by the Max scale on X/Y and clamped by half the total length

◆ GetScaledVolume()

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

◆ GetShortestDistanceToPoint()

float FKSphylElem::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 FKSphylElem::GetTransform ( ) const
inlinefinaloverridevirtual

Reimplemented from FKShapeElem.

◆ GetVolume()

FVector::FReal FKSphylElem::GetVolume ( const FVector Scale) const
inline

◆ ScaleElem()

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

◆ SetTransform()

void FKSphylElem::SetTransform ( const FTransform InTransform)
inline

Friends And Related Symbol Documentation

◆ operator==

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

Member Data Documentation

◆ Center

FVector FKSphylElem::Center

Position of the capsule's origin

◆ Length

float FKSphylElem::Length

This is of line-segment ie. add Radius to both ends to find total length.

◆ Radius

float FKSphylElem::Radius

Radius of the capsule

◆ Rotation

FRotator FKSphylElem::Rotation

Rotation of the capsule

◆ StaticShapeType

EAggCollisionShape::Type FKSphylElem::StaticShapeType = EAggCollisionShape::Sphyl
static

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