TConvexHalfEdgeStructureData

Convex half-edge structure data. Uses indices rather than pointers. Supports different index sizes.

Windows
MacOS
Linux

References

Module

Chaos

Header

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

Include

#include "Chaos/ConvexHalfEdgeStructureData.h"

Syntax

template<typename T_INDEX>
class TConvexHalfEdgeStructureData

Remarks

Convex half-edge structure data. Uses indices rather than pointers. Supports different index sizes.

Functions

Name Description

Public function Static

bool

 

CanMake

(
    const TArray< TArray< int32 >>& In...,
    int32 InNumVertices
)

Return true if we can support this convex, based on number of features and maximum index size.

Public function Const

int32

 

FindVertexPlanes

(
    int32 VertexIndex,
    int32* PlaneIndices,
    int32 MaxVertexPlanes
)

Fill an array with plane indices for the specified vertex. Return the number of planes found.

Public function Const

int32

 

GetEdgePlane

(
    int32 EdgeIndex,
    int32 EdgePlaneIndex
)

Get a plane for the specified Edge (

edge index, not half-edge index) EdgeIndex must be in range [0, NumEdges()) EdgePlaneIndex must be 0 or 1 return value is in range [0, NumPlanes())

Public function Const

int32

 

GetEdgeVertex

(
    int32 EdgeIndex,
    int32 EdgeVertexIndex
)

Get a vertex in the specified Edge (

edge index, not half-edge index) EdgeIndex must be in range [0, NumEdges()) EdgeVertexIndex must be 0 or 1 return value is in range [0, NumVertices())

Public function Const

const FHalfE...

 

GetHalfEdge

(
    int32 HalfEdgeIndex
)

Public function

FHalfEdgeDat...

 

GetHalfEdge

(
    int32 HalfEdgeIndex
)

Public function Const

int32

 

GetHalfEdgePlane

(
    int32 HalfEdgeIndex
)

HalfEdgeIndex must be in range [0, NumHalfEdges()) return value is in range [0, NumPlanes())

Public function Const

int32

 

GetHalfEdgeVertex

(
    int32 HalfEdgeIndex
)

HalfEdgeIndex must be in range [0, NumHalfEdges()) return value is in range [0, NumVertices())

Public function Const

int32

 

GetNextHalfEdge

(
    int32 HalfEdgeIndex
)

Get the next half edge on the same plane HalfEdgeIndex must be in range [0, NumHalfEdges()) return value is in range [0, NumHalfEdges())

Public function Const

const FPlane...

 

GetPlane

(
    int32 PlaneIndex
)

Public function

FPlaneData &

 

GetPlane

(
    int32 PlaneIndex
)

Public function Const

int32

 

GetPlaneHalfEdge

(
    int32 PlaneIndex,
    int32 PlaneEdgeIndex
)

The edge index of one of the bounding edges of a plane PlaneIndex must be in range [0, NumPlanes()) PlaneEdgeIndex must be in range [0, NumPlaneHalfEdges(PlaneIndex)) return value is in range [0, NumHalfEdges())

Public function Const

int32

 

GetPlaneVertex

(
    int32 PlaneIndex,
    int32 PlaneVertexIndex
)

Get the index of one of the vertices bounding the specified plane PlaneIndex must be in range [0, NumPlanes()) PlaneVertexIndex must be in [0, NumPlaneVertices(PlaneIndex)) return value is in [0, NumVertices())

Public function Const

int32

 

GetPrevHalfEdge

(
    int32 HalfEdgeIndex
)

Get the previous half edge on the same plane HalfEdgeIndex must be in range [0, NumHalfEdges()) return value is in range [0, NumHalfEdges())

Public function Const

int32

 

GetTwinHalfEdge

(
    int32 HalfEdgeIndex
)

HalfEdgeIndex must be in range [0, NumHalfEdges()) return value is in range [0, NumHalfEdges())

Public function Const

const FVerte...

 

GetVertex

(
    int32 VertexIndex
)

Public function

FVertexData ...

 

GetVertex

(
    int32 VertexIndex
)

Public function Const

int32

 

GetVertexFirstHalfEdge

(
    int32 VertexIndex
)

VertexIndex must be in range [0, NumVertices()) return value is in range [0, NumHalfEdges())

Public function Const

bool

 

IsValid()

Public function Static

FConvexHalfE...

 

MakePlaneVertices

(
    const TArray< TArray< int32 >>& In...,
    int32 InNumVertices
)

Initialize the structure data from the array of vertex indices per plane (in CW or CCW order - it is retained in structure) If this fails for some reason, the structure data will be invalid (check IsValid())

Public function Const

int32

 

NumEdges()

Number of unique half-edges (no half edge's twin is in also the list). Should be NumHalfEdges/2.

Public function Const

int32

 

NumHalfEdges()

Public function Const

int32

 

NumPlaneHalfEdges

(
    int32 PlaneIndex
)

The number of edges bounding the specified plane.

Public function Const

int32

 

NumPlanes()

Public function Const

int32

 

NumPlaneVertices

(
    int32 PlaneIndex
)

The number of vertices that bound the specified plane (same as number of half edges) PlaneIndex must be in range [0, NumPlaneHalfEdges(PlaneIndex))

Public function Const

int32

 

NumVertices()

Public function

void

 

Serialize

(
    FArchive& Ar
)

Public function

bool

 

SetPlaneVertices

(
    const TArray< TArray< int32 >>& In...,
    int32 InNumVertices
)

Initialize the structure data from the set of vertices associated with each plane.

Public function Const

void

 

VisitPlaneEdges

(
    int32 PlaneIndex,
    const TFunction< bool HalfEdg...
)

Iterate over the edges associated with a plane.

Public function Const

void

 

VisitVertexHalfEdges

(
    int32 VertexIndex,
    const TFunction< bool HalfEdg...
)

Iterate over the half-edges associated with a vertex (leading out from the vertex, so all half edges have the vertex as the root).

Classes

Name

Description

Public struct

FHalfEdgeData

Every plane is bounded by a sequence of edges, and every edge should be shared by two planes.

Public struct

FPlaneData

A plane of a convex hull.

Public struct

FVertexData

A vertex of a convex hull.

Typedefs

Constants

Name

Description

InvalidIndex

MaxIndex

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