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

void

 

ComputePolygonTangentsAndNormals

(
    const TArray< FPolygonID >& Polygo...,
    float ComparisonThreshold
)

Set the polygon tangent and normal only for the specified polygonIDs

Public function

void

 

ComputePolygonTangentsAndNormals

(
    float ComparisonThreshold
)

Set the polygon tangent and normal for all polygons in the mesh description.

Public function

void

 

ComputePolygonTriangulation

(
    const FPolygonID PolygonID,
    TArray< FMeshTriangle >& OutTriang...
)

Public function

void

 

ComputeTangentsAndNormals

(
    const TArray< FVertexInstanceID >&...,
    EComputeNTBsOptions ComputeNTBsOpti...
)

Set the vertex instance tangent and normal only for the specified VertexInstanceIDs

Public function

void

 

ComputeTangentsAndNormals

(
    EComputeNTBsOptions ComputeNTBsOpti...
)

Set the vertex instance tangent and normal for all vertex instances in the mesh description.

Public function

FEdgeID

 

CreateEdge

(
    const FVertexID VertexID0,
    const FVertexID VertexID1,
    const TArray< FPolygonID >& Connec...
)

Adds a new edge to the mesh and returns its ID

Public function

void

 

CreateEdgeWithID

(
    const FEdgeID EdgeID,
    const FVertexID VertexID0,
    const FVertexID VertexID1,
    const TArray< FPolygonID >& Connec...
)

Adds a new edge to the mesh with the given ID

Public function

FPolygonID

 

CreatePolygon

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

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...,
    const TArray< FVertexInstanceID >&...,
    TArray< FEdgeID >* OutEdgeIDs
)

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 a 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

 

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

void

 

DetermineEdgeHardnessesFromVertexInstanceNormals

(
    const float Tolerance
)

Determine the edge hardnesses from existing normals

Public function

void

 

DetermineUVSeamsFromUVs

(
    const int32 UVIndex,
    const float Tolerance
)

Determine UV seams from existing vertex instance UVs

Public function Const

const TAttri...

 

EdgeAttributes()

Public function

TAttributesS...

 

EdgeAttributes()

Public function

FEdgeArray &

 

Edges()

Public function Const

const FEdgeA...

 

Edges()

Public function

void

 

Empty()

Empty the meshdescription.

Public function

void

 

GetAllCharts

(
    TArray< TArray< FPolygonID >>& Out...
)

Get array of all UV charts

Public function

FMeshEdge &

 

GetEdge

(
    const FEdgeID EdgeID
)

Public function Const

const FMeshE...

 

GetEdge

(
    const FEdgeID EdgeID
)

Public function Const

const TArray...

 

GetEdgeConnectedPolygons

(
    const FEdgeID EdgeID
)

Returns reference to an array of polygon 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

TTuple< FVer...

 

GetEdgeVertices

(
    const FEdgeID EdgeID
)

Returns a pair of vertex IDs defining the edge

Public function

FMeshPolygon...

 

GetPolygon

(
    const FPolygonID PolygonID
)

Public function Const

const FMeshP...

 

GetPolygon

(
    const FPolygonID PolygonID
)

Public function Const

void

 

GetPolygonEdges

(
    const FPolygonID PolygonID,
    TArray< FEdgeID >& OutPolygonEdges
)

Public function

FMeshPolygon...

 

GetPolygonGroup

(
    const FPolygonGroupID PolygonGroupI...
)

Public function Const

const FMeshP...

 

GetPolygonGroup

(
    const FPolygonGroupID PolygonGroupI...
)

Public function Const

const TArray...

 

GetPolygonGroupPolygons

(
    const FPolygonGroupID PolygonGroupI...
)

Returns the polygons associated with the given polygon group

Public function Const

const TArray...

 

GetPolygonPerimeterVertexInstances

(
    const FPolygonID PolygonID
)

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

Public function Const

void

 

GetPolygonPerimeterVertices

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

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

Public function Const

FPolygonGrou...

 

GetPolygonPolygonGroup

(
    const FPolygonID PolygonID
)

Return the polygon group associated with a polygon

Public function

void

 

GetPolygonsInSameChartAsPolygon

(
    const FPolygonID PolygonID,
    TArray< FPolygonID >& OutPolygonID...
)

Get polygons in the same UV chart as the specified polygon

Public function

TArray< FMes...

 

GetPolygonTriangles

(
    const FPolygonID PolygonID
)

Returns reference to the array of triangles representing the triangulated polygon

Public function Const

const TArray...

 

GetPolygonTriangles

(
    const FPolygonID PolygonID
)

Public function

FMeshVertex ...

 

GetVertex

(
    const FVertexID VertexID
)

Public function Const

const FMeshV...

 

GetVertex

(
    const FVertexID VertexID
)

Public function Const

void

 

GetVertexAdjacentVertices

(
    const FVertexID VertexID,
    TArray< FVertexID >& OutAdjacentVe...
)

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

Public function Const

const TArray...

 

GetVertexConnectedEdges

(
    const FVertexID VertexID
)

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

Public function Const

void

 

GetVertexConnectedPolygons

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

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

Public function

FMeshVertexI...

 

GetVertexInstance

(
    const FVertexInstanceID VertexInsta...
)

Public function Const

const FMeshV...

 

GetVertexInstance

(
    const FVertexInstanceID VertexInsta...
)

Public function Const

const TArray...

 

GetVertexInstanceConnectedPolygons

(
    const FVertexInstanceID VertexInsta...
)

Returns reference to an array of Polygon 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

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

 

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

 

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

FPolygonGrou...

 

PolygonGroups()

Public function Const

const FPolyg...

 

PolygonGroups()

Public function

FPolygonArra...

 

Polygons()

Public function Const

const FPolyg...

 

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

 

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

 

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()

Public function

void

 

ReversePolygonFacing

(
    const FPolygonID PolygonID
)

Public function

void

 

SetPolygonPolygonGroup

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

Sets the polygon group associated with a polygon

Public function

void

 

TriangulateMesh()

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=

(
    const FMeshDescription&
)

Public function

FMeshDescrip...

 

operator=

(
    FMeshDescription&&
)

Classes

Name

Description

Public struct

FContourPoint

Pair of IDs representing the vertex instance ID on a contour, and the edge ID which starts at that point, winding counter-clockwise

Deprecated Functions

Name Description

Public function

FPolygonID

 

CreatePolygon

(
    const FPolygonGroupID PolygonGroupI...,
    const TArray< FContourPoint >& Per...
)

Please use a different CreatePolygon() overload.

Public function

void

 

CreatePolygonWithID

(
    const FPolygonID PolygonID,
    const FPolygonGroupID PolygonGroupI...,
    const TArray< FContourPoint >& Per...
)

Please use a different CreatePolygonWithID() overload.

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