Navigation
Unreal Engine C++ API Reference > Runtime > Engine > PhysicsEngine
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
Type | Name | Description | |
---|---|---|---|
![]() |
FBox | ElemBox | Bounding box of this convex hull. |
![]() |
TArray< int32 > | IndexData | |
![]() |
TArray< FVector > | VertexData | Array of indices that make up the convex hull. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FKConvexElem () |
||
![]() |
FKConvexElem
(
const FKConvexElem& Other |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddCachedSolidConvexGeom
(
TArray< FDynamicMeshVertex >& VertexBuffer, |
|
![]() |
void | Apply current element transform to verts, and reset transform to identity | |
![]() ![]() |
FBox | CalcAABB
(
const FTransform& BoneTM, |
Calculate a bounding box for this convex element with the specified transform and scale |
![]() |
void | ComputeChaosConvexIndices
(
bool bForceCompute |
|
![]() |
void | ConvexFromBoxElem
(
const FKBoxElem& InBox |
Utility for setting this convex element to match a supplied box element. Also copies transform. |
![]() ![]() |
void | DrawElemSolid
(
FPrimitiveDrawInterface* PDI, |
|
![]() ![]() |
TArray< int32 > | ||
![]() ![]() |
const auto & | ||
![]() ![]() |
float | GetClosestPointAndNormal
(
const FVector& WorldPosition, |
Finds the closest point on the shape given a world position. |
![]() ![]() |
void | Get set of planes that define this convex hull | |
![]() ![]() |
FVector::FReal | GetScaledVolume
(
const FVector& Scale3D |
Returns the volume of this element |
![]() ![]() |
float | GetShortestDistanceToPoint
(
const FVector& WorldPosition, |
Finds the shortest distance between the element and a world position. |
![]() ![]() |
FTransform | GetTransform () |
Get current transform applied to convex mesh vertices |
![]() |
bool | HullFromPlanes
(
const TArray< FPlane >& InPlanes, |
Utility for creating a convex hull from a set of planes. Will reset current state of this elem. |
![]() |
void | Reset () |
Reset the hull to empty all arrays |
![]() |
void | ||
![]() |
void | ScaleElem
(
FVector DeltaSize, |
|
![]() |
void | SetChaosConvexMesh
(
TSharedPtr< Chaos::FConvex, ESPMode::ThreadSafe >&& InChaosConvex, |
Set the chaos convex mesh Note : This will by default invalidate the convex data and recompute them by calling ComputeChaosConvexIndices Only set ConvexDataUpdateMethod to UpdateConvexDataOnlyIfMissing if you know the data is up to date with the chaos convex object or if you plan to call ComputeChaosConvexIndices later |
![]() |
void | SetTransform
(
const FTransform& InTransform |
Modify the transform to apply to convex mesh vertices NOTE: When doing this, BodySetup convex meshes need to be recooked - usually by calling InvalidatePhysicsData() and CreatePhysicsMeshes() |
![]() |
void | Updates internal ElemBox based on current value of VertexData |
Overridden from FKShapeElem
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
void | DrawElemWire
(
FPrimitiveDrawInterface* PDI, |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
const FKConvexElem & | operator=
(
const FKConvexElem& Other |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
EConvexDataUpdateMethod |
Constants
Name | Description |
---|---|
StaticShapeType |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FVector::FReal | GetVolume
(
const FVector& Scale |
Changed to GetScaledVolume. Note that Volume calculation now includes non-uniform scale so values may have changed |