FMeshDescription

USTRUCT()

Windows
MacOS
Linux

References

Module

MeshDescription

Header

/Engine/Source/Runtime/MeshDescription/Public/MeshDescription.h

Include

#include "MeshDescription.h"

Syntax

struct FMeshDescription

Remarks

USTRUCT()

Constructors

Name Description

Public function

FMeshDescription()

Mesh description should be a moveable type.

Public function

FMeshDescription

(
    const FMeshDescription &
)

Public function

FMeshDescription

(
    FMeshDescription &&
)

Destructors

Name Description

Public function

~FMeshDescription()

Functions

Name Description

Public function

void

 

Compact

(
    FElementIDRemappings & OutRemapping...
)

Compacts the data held in the mesh description, and returns an object describing how the IDs have been remapped.

Public function Const

FBox

 

ComputeBoundingBox()

Public function

void

 

ComputePolygonTriangulation

(
    const FPolygonID PolygonID
)

Generates triangles and internal edges for the given polygon

Public function

FEdgeID

 

CreateEdge

(
    const FVertexID VertexID0,
    const FVertexID VertexID1
)

Adds a new edge to the mesh and returns its ID

Public function

void

 

CreateEdgeWithID

(
    const FEdgeID EdgeID,
    const FVertexID VertexID0,
    const FVertexID VertexID1
)

Adds a new edge to the mesh with the given ID

Public function

FPolygonID

 

CreatePolygon

(
    const FPolygonGroupID PolygonGroupI...,
    TArrayView < const FVertexInstanceID ...,
    TArray < FEdgeID >* OutEdgeIDs
)

Adds a new polygon to the mesh and returns its ID.

Public function

FPolygonGrou ...

 

CreatePolygonGroup()

Adds a new polygon group to the mesh and returns its ID

Public function

void

 

CreatePolygonGroupWithID

(
    const FPolygonGroupID PolygonGroupI...
)

Adds a new polygon group to the mesh with the given ID

Public function

void

 

CreatePolygonWithID

(
    const FPolygonID PolygonID,
    const FPolygonGroupID PolygonGroupI...,
    TArrayView < const FVertexInstanceID ...,
    TArray < FEdgeID >* OutEdgeIDs
)

Adds a new polygon to the mesh with the given ID.

Public function

FTriangleID

 

CreateTriangle

(
    const FPolygonGroupID PolygonGroupI...,
    TArrayView < const FVertexInstanceID ...,
    TArray < FEdgeID >* OutEdgeIDs
)

Adds a new triangle to the mesh and returns its ID.

Public function

void

 

CreateTriangleWithID

(
    const FTriangleID TriangleID,
    const FPolygonGroupID PolygonGroupI...,
    TArrayView < const FVertexInstanceID ...,
    TArray < FEdgeID >* OutEdgeIDs
)

Adds a new triangle to the mesh with the given ID.

Public function

FVertexID

 

CreateVertex()

Adds a new vertex to the mesh and returns its ID

Public function

FVertexInsta ...

 

CreateVertexInstance

(
    const FVertexID VertexID
)

Adds a new vertex instance to the mesh and returns its ID

Public function

void

 

CreateVertexInstanceWithID

(
    const FVertexInstanceID VertexInsta...,
    const FVertexID VertexID
)

Adds a new vertex instance to the mesh with the given ID

Public function

void

 

CreateVertexWithID

(
    const FVertexID VertexID
)

Adds a new vertex to the mesh with the given ID

Public function

void

 

DeleteEdge

(
    const FEdgeID EdgeID,
    TArray < FVertexID >* InOutOrph...
)

Deletes an edge from the mesh

Public function

void

 

DeletePolygon

(
    const FPolygonID PolygonID,
    TArray < FEdgeID >* InOutOrphan...,
    TArray < FVertexInstanceID >* I...,
    TArray < FPolygonGroupID >* InO...
)

Deletes a polygon from the mesh

Public function

void

 

DeletePolygonGroup

(
    const FPolygonGroupID PolygonGroupI...
)

Deletes a polygon group from the mesh

Public function

void

 

DeletePolygons

(
    const TArray < FPolygonID >& Polygo...
)

Deletes polygons from the mesh and remove all orphaned polygon groups, vertex instances, edges and vertices.

Public function

void

 

DeleteTriangle

(
    const FTriangleID TriangleID,
    TArray < FEdgeID >* InOutOrphan...,
    TArray < FVertexInstanceID >* I...,
    TArray < FPolygonGroupID >* InO...
)

Deletes a triangle from the mesh

Public function

void

 

DeleteTriangles

(
    const TArray < FTriangleID >& Trian...
)

Deletes triangles from the mesh and remove all orphaned polygon groups, vertex instances, edges and vertices.

Public function

void

 

DeleteVertex

(
    const FVertexID VertexID
)

Deletes a vertex from the mesh

Public function

void

 

DeleteVertexInstance

(
    const FVertexInstanceID VertexInsta...,
    TArray < FVertexID >* InOutOrph...
)

Deletes a vertex instance from a mesh

Public function Const

const TAttri ...

 

EdgeAttributes()

Public function

TAttributesS ...

 

EdgeAttributes()

Public function Const

const FEdgeA ...

 

Edges()

Public function

FEdgeArray &

 

Edges()

Public function

void

 

Empty()

Empty the meshdescription.

Public function Const

FBoxSphereBo ...

 

GetBounds()

Returns bounds of vertices

Public function Const

void

 

GetEdgeConnectedPolygons

(
    const FEdgeID EdgeID,
    TArray < FPolygonID , Alloc >& OutPo...
)

Populates the passed array with polygon IDs connected to this edge

Public function Const

TArray < FPol ...

 

GetEdgeConnectedPolygons

(
    const FEdgeID EdgeID
)

Returns the polygons connected to this edge

Public function Const

TArray < FPol ...

 

GetEdgeConnectedPolygons

(
    const FEdgeID EdgeID
)

Returns the polygons connected to this edge as an array with the specified allocator template type.

Public function Const

const TArray ...

 

GetEdgeConnectedTriangles

(
    const FEdgeID EdgeID
)

Returns reference to an array of triangle IDs connected to this edge

Public function Const

FVertexID

 

GetEdgeVertex

(
    const FEdgeID EdgeID,
    int32 VertexNumber
)

Returns the vertex ID corresponding to one of the edge endpoints

Public function Const

TArrayView < ...

 

GetEdgeVertices

(
    const FEdgeID EdgeID
)

Returns a pair of vertex IDs defining the edge

Public function Const

int32

 

GetNumEdgeConnectedPolygons

(
    const FEdgeID EdgeID
)

Returns the number of polygons connected to this edge

Public function Const

int32

 

GetNumEdgeConnectedTriangles

(
    const FEdgeID EdgeID
)

Public function Const

int32

 

GetNumPolygonGroupPolygons

(
    const FPolygonGroupID PolygonGroupI...
)

Returns the number of polygons in this polygon group

Public function Const

int32

 

GetNumPolygonInternalEdges

(
    const FPolygonID PolygonID
)

Return the number of internal edges in this polygon

Public function Const

int32

 

GetNumPolygonTriangles

(
    const FPolygonID PolygonID
)

Return the number of triangles which comprise this polygon

Public function Const

int32

 

GetNumPolygonVertices

(
    const FPolygonID PolygonID
)

Returns the number of vertices this polygon has

Public function Const

int32

 

GetNumVertexConnectedEdges

(
    const FVertexID VertexID
)

Returns number of edges connected to this vertex

Public function Const

int32

 

GetNumVertexConnectedPolygons

(
    const FVertexID VertexID
)

Returns the number of polygons connected to this vertex

Public function Const

int32

 

GetNumVertexConnectedTriangles

(
    const FVertexID VertexID
)

Returns number of triangles connected to this vertex

Public function Const

int32

 

GetNumVertexInstanceConnectedPolygons

(
    const FVertexInstanceID VertexInsta...
)

Returns the number of polygons connected to this vertex instance.

Public function Const

int32

 

GetNumVertexInstanceConnectedTriangles

(
    const FVertexInstanceID VertexInsta...
)

Returns the number of triangles connected to this vertex instance

Public function Const

int32

 

GetNumVertexVertexInstances

(
    const FVertexID VertexID
)

Returns number of vertex instances created from this vertex

Public function Const

TArray < FPol ...

 

GetPolygonAdjacentPolygons

(
    const FPolygonID PolygonID
)

Return adjacent polygons into a TArray with the specified allocator

Public function Const

TArray < FPol ...

 

GetPolygonAdjacentPolygons

(
    const FPolygonID PolygonID
)

Return adjacent polygons to this polygon

Public function Const

void

 

GetPolygonAdjacentPolygons

(
    const FPolygonID PolygonID,
    TArray < FPolygonID , Alloc >& OutPo...
)

Populates the passed array with adjacent polygons

Public function Const

float

 

GetPolygonCornerAngleForVertex

(
    const FPolygonID PolygonID,
    const FVertexID VertexID
)

Public function Const

const TArray ...

 

GetPolygonGroupPolygons

(
    const FPolygonGroupID PolygonGroupI...
)

Returns the polygons associated with the given polygon group

Public function Const

TArray < FEdg ...

 

GetPolygonInternalEdges

(
    const FPolygonID PolygonID
)

Return the internal edges of this polygon, i.e. those which separate constituent triangles

Public function Const

TArray < FEdg ...

 

GetPolygonInternalEdges

(
    const FPolygonID PolygonID
)

Return the internal edges of this polygon, i.e. those which separate constituent triangles

Public function Const

void

 

GetPolygonInternalEdges

(
    const FPolygonID PolygonID,
    TArray < FEdgeID , Alloc >& OutEdgeI...
)

Populate the provided array with a list of edges which are internal to the polygon, i.e. those which separate constituent triangles.

Public function Const

void

 

GetPolygonPerimeterEdges

(
    const FPolygonID PolygonID,
    TArray < FEdgeID , Alloc >& OutEdgeI...
)

Populates the passed array with the edges which form the polygon perimeter

Public function Const

TArray < FEdg ...

 

GetPolygonPerimeterEdges

(
    const FPolygonID PolygonID
)

Returns the vertices which form the polygon perimeter

Public function Const

TArray < FEdg ...

 

GetPolygonPerimeterEdges

(
    const FPolygonID PolygonID
)

Returns the vertices which form the polygon perimeter as an array templated on the given allocator

Public function Const

FPolygonGrou ...

 

GetPolygonPolygonGroup

(
    const FPolygonID PolygonID
)

Return the polygon group associated with a polygon

Public function Const

const TArray ...

 

GetPolygonTriangleIDs

(
    const FPolygonID PolygonID
)

Return reference to an array of triangle IDs which comprise this polygon

Public function Const

const TArray ...

 

GetPolygonVertexInstances

(
    const FPolygonID PolygonID
)

Returns reference to an array of VertexInstance IDs forming the perimeter of this polygon

Public function Const

void

 

GetPolygonVertices

(
    const FPolygonID PolygonID,
    TArray < FVertexID , Alloc >& OutVer...
)

Populates the passed array of VertexIDs with the vertices which form the polygon perimeter

Public function Const

TArray < FVer ...

 

GetPolygonVertices

(
    const FPolygonID PolygonID
)

Returns the vertices which form the polygon perimeter

Public function Const

TArray < FVer ...

 

GetPolygonVertices

(
    const FPolygonID PolygonID
)

Returns the vertices which form the polygon perimeter as an array templated on the given allocator

Public function Const

void

 

GetTriangleAdjacentTriangles

(
    const FTriangleID TriangleID,
    TArray < FTriangleID , Alloc >& OutT...
)

Populates the passed array with adjacent triangles

Public function Const

TArray < FTri ...

 

GetTriangleAdjacentTriangles

(
    const FTriangleID TriangleID
)

Return adjacent triangles to this triangle

Public function Const

TArray < FTri ...

 

GetTriangleAdjacentTriangles

(
    const FTriangleID TriangleID
)

Return adjacent triangles into a TArray with the specified allocator

Public function Const

void

 

GetTriangleEdges

(
    const FTriangleID TriangleID,
    TArrayView < FEdgeID > OutEdgeIDs
)

Populates the passed array with the edges which define this triangle

Public function Const

TStaticArray ...

 

GetTriangleEdges

(
    const FTriangleID TriangleID
)

Return the edges which form this triangle

Public function Const

FPolygonID

 

GetTrianglePolygon

(
    const FTriangleID TriangleID
)

Get the polygon which contains this triangle

Public function Const

FPolygonGrou ...

 

GetTrianglePolygonGroup

(
    const FTriangleID TriangleID
)

Get the polygon group which contains this triangle

Public function Const

FVertexInsta ...

 

GetTriangleVertexInstance

(
    const FTriangleID TriangleID,
    const int32 Index
)

Get the specified vertex instance by index

Public function Const

TArrayView < ...

 

GetTriangleVertexInstances

(
    const FTriangleID TriangleID
)

Get the vertex instances which define this triangle

Public function Const

void

 

GetTriangleVertices

(
    const FTriangleID TriangleID,
    TArrayView < FVertexID > OutVertexID...
)

Populates the passed array with the vertices which define this triangle

Public function Const

TStaticArray ...

 

GetTriangleVertices

(
    const FTriangleID TriangleID
)

Return the vertices which define this triangle

Public function Const

void

 

GetVertexAdjacentVertices

(
    const FVertexID VertexID,
    TArray < FVertexID , Alloc >& OutAdj...
)

Populates the passed array of VertexIDs with the vertices adjacent to this vertex

Public function Const

TArray < FVer ...

 

GetVertexAdjacentVertices

(
    const FVertexID VertexID
)

Returns the vertices adjacent to this vertex

Public function Const

TArray < FVer ...

 

GetVertexAdjacentVertices

(
    const FVertexID VertexID
)

Returns the vertices adjacent to this vertex as an array with the specified allocator template type.

Public function Const

const TArray ...

 

GetVertexConnectedEdges

(
    const FVertexID VertexID
)

Returns reference to an array of Edge IDs connected to this vertex

Public function Const

TArray < FPol ...

 

GetVertexConnectedPolygons

(
    const FVertexID VertexID
)

Returns the polygons connected to this vertex as an array with the specified allocator template type.

Public function Const

void

 

GetVertexConnectedPolygons

(
    const FVertexID VertexID,
    TArray < FPolygonID , Alloc >& OutCo...
)

Populates the passed array of PolygonIDs with the polygons connected to this vertex

Public function Const

TArray < FPol ...

 

GetVertexConnectedPolygons

(
    const FVertexID VertexID
)

Returns the polygons connected to this vertex

Public function Const

TArray < FTri ...

 

GetVertexConnectedTriangles

(
    const FVertexID VertexID
)

Returns the triangles connected to this vertex as an array with the specified allocator template type.

Public function Const

TArray < FTri ...

 

GetVertexConnectedTriangles

(
    const FVertexID VertexID
)

Returns the triangles connected to this vertex

Public function Const

void

 

GetVertexConnectedTriangles

(
    const FVertexID VertexID,
    TArray < FTriangleID , Alloc >& OutC...
)

Populates the passed array of TriangleIDs with the triangles connected to this vertex

Public function Const

TArray < FPol ...

 

GetVertexInstanceConnectedPolygons

(
    const FVertexInstanceID VertexInsta...
)

Returns the polygons connected to this vertex instance

Public function Const

TArray < FPol ...

 

GetVertexInstanceConnectedPolygons

(
    const FVertexInstanceID VertexInsta...
)

Returns the polygons connected to this vertex instance as an array with the specified allocator template type.

Public function Const

void

 

GetVertexInstanceConnectedPolygons

(
    const FVertexInstanceID VertexInsta...,
    TArray < FPolygonID , Alloc >& OutPo...
)

Populates the passed array with the polygons connected to this vertex instance

Public function Const

const TArray ...

 

GetVertexInstanceConnectedTriangles

(
    const FVertexInstanceID VertexInsta...
)

Returns reference to an array of Triangle IDs connected to this vertex instance

Public function Const

FVertexInsta ...

 

GetVertexInstanceForPolygonVertex

(
    const FPolygonID PolygonID,
    const FVertexID VertexID
)

Return the vertex instance which corresponds to the given vertex on the given polygon, or FVertexInstanceID::Invalid

Public function Const

FVertexInsta ...

 

GetVertexInstanceForTriangleVertex

(
    const FTriangleID TriangleID,
    const FVertexID VertexID
)

Return the vertex instance which corresponds to the given vertex on the given triangle, or FVertexInstanceID::Invalid

Public function Const

FEdgeID

 

GetVertexInstancePairEdge

(
    const FVertexInstanceID VertexInsta...,
    const FVertexInstanceID VertexInsta...
)

Returns the edge ID defined by the two given vertex instance IDs, if there is one; otherwise FEdgeID::Invalid

Public function Const

FVertexID

 

GetVertexInstanceVertex

(
    const FVertexInstanceID VertexInsta...
)

Returns the vertex ID associated with the given vertex instance

Public function Const

FEdgeID

 

GetVertexPairEdge

(
    const FVertexID VertexID0,
    const FVertexID VertexID1
)

Returns the edge ID defined by the two given vertex IDs, if there is one; otherwise FEdgeID::Invalid

Public function Const

const TArray ...

 

GetVertexVertexInstances

(
    const FVertexID VertexID
)

Returns reference to an array of VertexInstance IDs instanced from this vertex

Public function Const

bool

 

IsEdgeInternal

(
    const FEdgeID EdgeID
)

Determine whether a given edge is an internal edge between triangles of a polygon

Public function Const

bool

 

IsEdgeInternalToPolygon

(
    const FEdgeID EdgeID,
    const FPolygonID PolygonID
)

Determine whether a given edge is an internal edge between triangles of a specific polygon

Public function Const

bool

 

IsEdgeValid

(
    const FEdgeID EdgeID
)

Returns whether the passed edge ID is valid

Public function Const

bool

 

IsEmpty()

Return whether the mesh description is empty.

Public function Const

bool

 

IsPolygonGroupValid

(
    const FPolygonGroupID PolygonGroupI...
)

Returns whether the passed polygon group ID is valid

Public function Const

bool

 

IsPolygonValid

(
    const FPolygonID PolygonID
)

Returns whether the passed polygon ID is valid

Public function Const

bool

 

IsTrianglePartOfNgon

(
    const FTriangleID TriangleID
)

Determines if this triangle is part of an n-gon

Public function Const

bool

 

IsTriangleValid

(
    const FTriangleID TriangleID
)

Returns whether the passed triangle ID is valid

Public function Const

bool

 

IsVertexInstanceValid

(
    const FVertexInstanceID VertexInsta...
)

Returns whether the passed vertex instance ID is valid

Public function Const

bool

 

IsVertexOrphaned

(
    const FVertexID VertexID
)

Returns whether a given vertex is orphaned, i.e. it doesn't form part of any polygon

Public function Const

bool

 

IsVertexValid

(
    const FVertexID VertexID
)

Returns whether the passed vertex ID is valid

Public function Const

const TAttri ...

 

PolygonAttributes()

Public function

TAttributesS ...

 

PolygonAttributes()

Public function Const

const TAttri ...

 

PolygonGroupAttributes()

Public function

TAttributesS ...

 

PolygonGroupAttributes()

Public function Const

const FPolyg ...

 

PolygonGroups()

Public function

FPolygonGrou ...

 

PolygonGroups()

Public function Const

const FPolyg ...

 

Polygons()

Public function

FPolygonArra ...

 

Polygons()

Public function

void

 

Remap

(
    const FElementIDRemappings & Remapp...
)

Remaps the element IDs in the mesh description according to the passed in object

Public function

void

 

RemapPolygonGroups

(
    const TMap < FPolygonGroupID , FPolyg ...
)

Remaps polygon groups according to the supplied map

Public function

void

 

ReserveNewEdges

(
    const int32 NumEdges
)

Reserves space for this number of new edges

Public function

void

 

ReserveNewPolygonGroups

(
    const int32 NumPolygonGroups
)

Reserves space for this number of new polygon groups

Public function

void

 

ReserveNewPolygons

(
    const int32 NumPolygons
)

Reserves space for this number of new polygons

Public function

void

 

ReserveNewTriangles

(
    const int32 NumTriangles
)

Reserves space for this number of new triangles

Public function

void

 

ReserveNewVertexInstances

(
    const int32 NumVertexInstances
)

Reserves space for this number of new vertex instances

Public function

void

 

ReserveNewVertices

(
    const int32 NumVertices
)

Reserves space for this number of new vertices

Public function

void

 

ReverseAllPolygonFacing()

Reverses the winding order of all polygons in the mesh

Public function

void

 

ReversePolygonFacing

(
    const FPolygonID PolygonID
)

Reverse the winding order of the vertices of this polygon

Public function

void

 

Serialize

(
    FArchive & Ar
)

Serialize the mesh description.

Public function

void

 

SetPolygonPolygonGroup

(
    const FPolygonID PolygonID,
    const FPolygonGroupID PolygonGroupI...
)

Sets the polygon group associated with a polygon

Public function

void

 

SetPolygonVertexInstance

(
    const FPolygonID PolygonID,
    const int32 PerimeterIndex,
    const FVertexInstanceID VertexInsta...
)

Set the vertex instance at the given index around the polygon to the new value

Public function Const

const TAttri ...

 

TriangleAttributes()

Public function

TAttributesS ...

 

TriangleAttributes()

Public function

FTriangleArr ...

 

Triangles()

Public function Const

const FTrian ...

 

Triangles()

Public function

void

 

TriangulateMesh()

Retriangulates the entire mesh

Public function

TAttributesS ...

 

VertexAttributes()

Public function Const

const TAttri ...

 

VertexAttributes()

Public function

TAttributesS ...

 

VertexInstanceAttributes()

Public function Const

const TAttri ...

 

VertexInstanceAttributes()

Public function

FVertexInsta ...

 

VertexInstances()

Public function Const

const FVerte ...

 

VertexInstances()

Public function

FVertexArray ...

 

Vertices()

Public function Const

const FVerte ...

 

Vertices()

Operators

Name Description

Public function

FMeshDescrip ...

 

operator=

(
    FMeshDescription &&
)

Public function

FMeshDescrip ...

 

operator=

(
    const FMeshDescription &
)

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback