FConvex

Instance wrapper (ImplicitScaled, ImplicitTransformed, or ImplicitInstanced).

Windows
MacOS
Linux

Inheritance Hierarchy

FImplicitObject

FConvex

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Convex.h

Include

#include "Chaos/Convex.h"

Syntax

class FConvex : public Chaos::FImplicitObject

Remarks

Instance wrapper (ImplicitScaled, ImplicitTransformed, or ImplicitInstanced). Usually the margin on the convex itself is zero.

Constructors

Name Description

Public function

FConvex()

Public function

FConvex

(
    const FConvex&
)

Public function

FConvex

(
    FConvex&& Other
)

Public function

FConvex

(
    TArray< TPlaneConcrete< FReal, 3 >>...,
    TArray< FVec3 >&& InVertices
)

Use the constructor version with the face indices.

Public function

FConvex

(
    const TArray< FVec3 >& InVertices,
    const FReal InMargin
)

Public function

FConvex

(
    TArray< TPlaneConcrete< FReal, 3 >>...,
    TArray< TArray< int32 >>&& InFaceI...,
    TArray< FVec3 >&& InVertices
)

Functions

Name Description

Public function Const

int32

 

FindVertexPlanes

(
    int32 VertexIndex,
    int32* OutVertexPlanes,
    int32 MaxVertexPlanes
)

Get an array of all the plane indices that belong to a vertex (up to MaxVertexPlanes).

Public function Const

FVec3

 

GetCenter()

Public function Const

const FVec3

 

GetCenterOfMass()

Public function Const

FVec3

 

GetClosestEdgePosition

(
    int32 PlaneIndex,
    const FVec3& Position
)

Get the nearest point on an edge of the specified face.

Public function Const

bool

 

GetClosestEdgeVertices

(
    int32 PlaneIndex,
    const FVec3& Position,
    int32& OutVertexIndex0,
    int32& OutVertexIndex1
)

Public function Const

int32

 

GetEdgePlane

(
    int32 EdgeIndex,
    int32 EdgePlaneIndex
)

Public function Const

int32

 

GetEdgeVertex

(
    int32 EdgeIndex,
    int32 EdgeVertexIndex
)

Public function Const

const TArray...

 

GetFaces()

Public function Const

const FMatri...

 

GetInertiaTensor

(
    const FReal Mass
)

Public function Const

FReal

 

GetMargin()

Public function Const

FVec3

 

GetMarginAdjustedVertex

(
    int32 VertexIndex,
    FReal InMargin
)

Public function Const

FVec3

 

GetMarginAdjustedVertexScaled

(
    int32 VertexIndex,
    FReal InMargin,
    const FVec3& Scale
)

Public function Const

int32

 

GetMostOpposingPlane

(
    const FVec3& Normal
)

Get the index of the plane that most opposes the normal.

Public function Const

int32

 

GetMostOpposingPlaneScaled

(
    const FVec3& Normal,
    const FVec3& Scale
)

Get the index of the plane that most opposes the normal.

Public function Const

const TPlane...

 

GetPlane

(
    int32 FaceIndex
)

Get the plane at the specified index (e.g., indices from FindVertexPlanes)

Public function Const

int32

 

GetPlaneVertex

(
    int32 PlaneIndex,
    int32 PlaneVertexIndex
)

Get the vertex index of one of the vertices making up the corners of the specified face.

Public function Const

FReal

 

GetRadius()

Public function Const

FRotation3

 

GetRotationOfMass()

Public function Const

const FConve...

 

GetStructureData()

The convex structure data (mainly exposed for testing)

Public function Const

const FVec3 ...

 

GetVertex

(
    int32 VertexIndex
)

Get the vertex at the specified index (e.g., indices from GetPlaneVertexs)

Public function Const

const TArray...

 

GetVertices()

Public function Const

const FReal

 

GetVolume()

Public function Const

FReal

 

GetWindingOrder()

Returns a winding order multiplier used in the manifold clipping and required when we have negative scales (See ImplicitObjectScaled)

Public function Const

bool

 

HasStructureData()

Whether the structure data has been created for this convex (will eventually always be true)

Public function

void

 

MovePlanesAndRebuild

(
    FReal InDelta
)

Public function Const

int32

 

NumEdges()

Public function Const

int32

 

NumPlanes()

Public function Const

int32

 

NumPlaneVertices

(
    int32 PlaneIndex
)

The number of vertices that make up the corners of the specified face.

Public function Const

int32

 

NumVertices()

Public function

void

 

SerializeImp

(
    FArchive& Ar
)

Public function

void

 

SimplifyGeometry()

Public function Static

constexpr EI...

 

StaticType()

Public function Const

FVec3

 

Support

(
    const FVec3& Direction,
    const FReal Thickness
)

Return support point on the shape

Public function Const

FVec3

 

SupportCore

(
    const FVec3& Direction,
    FReal InMargin
)

Return support point on the core shape (the convex shape with all planes moved inwards by margin).

Public function Const

FVec3

 

SupportCoreScaled

(
    const FVec3& Direction,
    FReal InMargin,
    const FVec3& Scale
)

SupportCore with non-uniform scale support.

Public function Const

FVec3

 

SupportScaled

(
    const FVec3& Direction,
    const FReal Thickness,
    const FVec3& Scale
)

Overridden from FImplicitObject

Name Description

Public function Virtual Const

const FAABB3

 

BoundingBox()

Public function Virtual Const

int32

 

FindClosestFaceAndVertices

(
    const FVec3& Position,
    TArray< FVec3 >& FaceVertices,
    FReal SearchDist
)

Finds the first intersecting face at given position

Public function Virtual Const

Pair< FVec3,...

 

FindClosestIntersectionImp

(
    const FVec3& StartPoint,
    const FVec3& EndPoint,
    const FReal Thickness
)

Public function Virtual Const

FVec3

 

FindGeometryOpposingNormal

(
    const FVec3& DenormDir,
    int32 FaceIndex,
    const FVec3& OriginalNormal
)

Given a normal and a face index, compute the most opposing normal associated with the underlying geometry features.

Public function Virtual Const

int32

 

FindMostOpposingFace

(
    const FVec3& Position,
    const FVec3& UnitDir,
    int32 HintFaceIndex,
    FReal SearchDist
)

Returns the most opposing face.

Public function Virtual Const

int32

 

FindMostOpposingFaceScaled

(
    const FVec3& Position,
    const FVec3& UnitDir,
    int32 HintFaceIndex,
    FReal SearchDist,
    const FVec3& Scale
)

Public function Virtual Const

uint32

 

GetTypeHash()

Public function Virtual Const

bool

 

IsPerformanceWarning()

Public function Virtual Const

bool

 

IsValidGeometry()

Public function Virtual

FString

 

PerformanceWarningAndSimplifaction()

Public function Virtual Const

FReal

 

PhiWithNormal

(
    const FVec3& X,
    FVec3& Normal
)

Return the distance to the surface.

Public function Virtual Const

FReal

 

PhiWithNormalScaled

(
    const FVec3& Pos,
    const FVec3& Scale,
    FVec3& Normal
)

Find the closest point on the surface, and return the separating distance and axis.

Public function Virtual Const

bool

 

Raycast

(
    const FVec3& StartPoint,
    const FVec3& Dir,
    const FReal Length,
    const FReal Thickness,
    FReal& OutTime,
    FVec3& OutPosition,
    FVec3& OutNormal,
    int32& OutFaceIndex
)

Calls [GJKRaycast()](API\Runtime\Chaos\Chaos\Chaos__GJKRaycast)_, which may return true but 0 for `OutTime, which means the bodies are touching, but not by enough to determine OutPosition_ and OutNormal_ should be.

Public function Virtual

void

 

Serialize

(
    FChaosArchive& Ar
)

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Public function Virtual Const

FString

 

ToString()

Operators

Name Description

Public function

FConvex &

 

operator=

(
    FConvex&& Other
)

Public function

FConvex &

 

operator=

(
    const FConvex& Other
)

Typedefs

Name

Description

TType

Constants

Name

Description

D

Deprecated Functions

Name Description

Public function

 

FConvex

(
    TArray< TPlaneConcrete< FReal, 3 >>...,
    TArray< FVec3 >&& InVertices
)

Use the constructor version with the face indices.

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