FKConvexElem

One convex hull, used for simplified collision.

Windows
MacOS
Linux

Inheritance Hierarchy

FKShapeElem

FKConvexElem

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/ConvexElem.h

Include

#include "PhysicsEngine/ConvexElem.h"

Syntax

struct FKConvexElem : public FKShapeElem

Remarks

One convex hull, used for simplified collision.

Variables

Name Description

Public variable

FBox

 

ElemBox

Bounding box of this convex hull.

Public variable

TArray< int32 >

 

IndexData

Public variable

TArray< FVector...

 

VertexData

Array of indices that make up the convex hull.

Constructors

Name Description

Public function

FKConvexElem()

Public function

FKConvexElem

(
    const FKConvexElem& Other
)

Destructors

Name Description

Public function

~FKConvexElem()

Functions

Name Description

Public function Const

void

 

AddCachedSolidConvexGeom

(
    TArray< FDynamicMeshVertex >& Vert...,
    TArray< uint32 >& IndexBuffer,
    const FColor VertexColor
)

Public function

void

 

BakeTransformToVerts()

Apply current element transform to verts, and reset transform to identity

Public function Const

FBox

 

CalcAABB

(
    const FTransform& BoneTM,
    const FVector& Scale3D
)

Calculate a bounding box for this convex element with the specified transform and scale

Public function

void

 

ConvexFromBoxElem

(
    const FKBoxElem& InBox
)

Utility for setting this convex element to match a supplied box element. Also copies transform.

Public function Const

void

 

DrawElemWire

(
    FPrimitiveDrawInterface* PDI,
    const FTransform& ElemTM,
    const float Scale,
    const FColor Color
)

Public function Const

void

 

GetPlanes

(
    TArray< FPlane >& Planes
)

Get set of planes that define this convex hull

Public function Const

FTransform

 

GetTransform()

Get current transform applied to convex mesh vertices

Public function Const

float

 

GetVolume

(
    const FVector& Scale
)

Returns the volume of this element

Public function

bool

 

HullFromPlanes

(
    const TArray< FPlane >& InPlanes,
    const TArray< FVector >& SnapVerts,
    float InSnapDistance
)

Utility for creating a convex hull from a set of planes. Will reset current state of this elem.

Public function

void

 

Reset()

Reset the hull to empty all arrays

Public function

void

 

ScaleElem

(
    FVector DeltaSize,
    float MinSize
)

Public function

void

 

SetTransform

(
    const FTransform& InTransform
)

Modify the transform to apply to convex mesh vertices

Public function

void

 

UpdateElemBox()

Updates internal ElemBox based on current value of VertexData

Operators

Name Description

Public function

const FKConv...

 

operator=

(
    const FKConvexElem& Other
)

Constants

Name

Description

StaticShapeType

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss