Navigation
API > API/Runtime > API/Runtime/MeshDescription
References
| Module | MeshDescription |
| Header | /Engine/Source/Runtime/MeshDescription/Public/MeshDescription.h |
| Include | #include "MeshDescription.h" |
Syntax
struct FMeshDescription
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Mesh description should be a moveable type. | |||
FMeshDescription
(
const FMeshDescription& |
|||
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | Compact
(
FElementIDRemappings& OutRemappings |
Compacts the data held in the mesh description, and returns an object describing how the IDs have been remapped. | |
| FBox | |||
| void | ComputePolygonTriangulation
(
const FPolygonID PolygonID |
Generates triangles and internal edges for the given polygon | |
| FEdgeID | CreateEdge
(
const FVertexID VertexID0, |
Adds a new edge to the mesh and returns its ID | |
| void | CreateEdgeWithID
(
const FEdgeID EdgeID, |
Adds a new edge to the mesh with the given ID | |
| FPolygonID | CreatePolygon
(
const FPolygonGroupID PolygonGroupID, |
Adds a new polygon to the mesh and returns its ID. | |
| FPolygonGroupID | Adds a new polygon group to the mesh and returns its ID | ||
| void | CreatePolygonGroupWithID
(
const FPolygonGroupID PolygonGroupID |
Adds a new polygon group to the mesh with the given ID | |
| void | CreatePolygonWithID
(
const FPolygonID PolygonID, |
Adds a new polygon to the mesh with the given ID. | |
| FTriangleID | CreateTriangle
(
const FPolygonGroupID PolygonGroupID, |
Adds a new triangle to the mesh and returns its ID. | |
| void | CreateTriangleWithID
(
const FTriangleID TriangleID, |
Adds a new triangle to the mesh with the given ID. | |
| FUVID | CreateUV
(
const int32 UVChannel |
Adds a new UV to the mesh and returns its ID | |
| void | CreateUVWithID
(
const FUVID UVID, |
Adds a new UV to the mesh with the given ID | |
| FVertexID | CreateVertex () |
Adds a new vertex to the mesh and returns its ID | |
| FVertexInstanceID | CreateVertexInstance
(
const FVertexID VertexID |
Adds a new vertex instance to the mesh and returns its ID | |
| void | CreateVertexInstanceWithID
(
const FVertexInstanceID VertexInstanceID, |
Adds a new vertex instance to the mesh with the given ID | |
| void | CreateVertexWithID
(
const FVertexID VertexID |
Adds a new vertex to the mesh with the given ID | |
| void | DeleteEdge
(
const FEdgeID EdgeID, |
Deletes an edge from the mesh | |
| void | DeletePolygon
(
const FPolygonID PolygonID, |
Deletes a polygon from the mesh | |
| void | DeletePolygonGroup
(
const FPolygonGroupID PolygonGroupID |
Deletes a polygon group from the mesh | |
| void | DeletePolygons
(
const TArray< FPolygonID >& Polygons |
Deletes polygons from the mesh and remove all orphaned polygon groups, vertex instances, edges and vertices. | |
| void | DeleteTriangle
(
const FTriangleID TriangleID, |
Deletes a triangle from the mesh | |
| void | DeleteTriangles
(
const TArray< FTriangleID >& Triangles |
Deletes triangles from the mesh and remove all orphaned polygon groups, vertex instances, edges and vertices. | |
| void | Deletes a UV from the mesh | ||
| void | DeleteVertex
(
const FVertexID VertexID |
Deletes a vertex from the mesh | |
| void | DeleteVertexInstance
(
const FVertexInstanceID VertexInstanceID, |
Deletes a vertex instance from a mesh | |
| const TAttributesSet< FEdgeID > & | |||
| TAttributesSet< FEdgeID > & | |||
| FEdgeArray & | Edges () |
||
| const FEdgeArray & | Edges () |
||
| void | Empty () |
Empty the meshdescription. | |
| void | FindPolygonPerimeter
(
const FPolygonID PolygonID, |
Determines the vertex instances which form the perimeter of a polygon | |
| void | FindPolygonPerimeter
(
TArrayView< const FTriangleID > Triangles, |
Determines the vertex instances which form the perimeter of a polygon | |
| FBoxSphereBounds | GetBounds () |
Returns bounds of vertices | |
| TArray< FPolygonID, Alloc > | GetEdgeConnectedPolygons
(
const FEdgeID EdgeID |
Returns the polygons connected to this edge as an array with the specified allocator template type. | |
| TArray< FPolygonID > | GetEdgeConnectedPolygons
(
const FEdgeID EdgeID |
Returns the polygons connected to this edge | |
| void | GetEdgeConnectedPolygons
(
const FEdgeID EdgeID, |
Populates the passed array with polygon IDs connected to this edge | |
| TArrayView< const FTriangleID > | GetEdgeConnectedTriangleIDs
(
const FEdgeID EdgeID |
Returns reference to an array of triangle IDs connected to this edge | |
| FVertexID | GetEdgeVertex
(
const FEdgeID EdgeID, |
Returns the vertex ID corresponding to one of the edge endpoints | |
| TArrayView< const FVertexID > | GetEdgeVertices
(
const FEdgeID EdgeID |
Returns a pair of vertex IDs defining the edge | |
| const TMap< FName, FMeshElementTypeWrapper > & | GetElements () |
||
| TMap< FName, FMeshElementTypeWrapper > & | GetElements () |
||
| int32 | GetNumEdgeConnectedPolygons
(
const FEdgeID EdgeID |
Returns the number of polygons connected to this edge | |
| int32 | GetNumEdgeConnectedTriangles
(
const FEdgeID EdgeID |
||
| int32 | GetNumPolygonGroupPolygons
(
const FPolygonGroupID PolygonGroupID |
Returns the number of polygons in this polygon group | |
| int32 | GetNumPolygonGroupTriangles
(
const FPolygonGroupID PolygonGroupID |
Returns the number of triangles in this polygon group | |
| int32 | GetNumPolygonInternalEdges
(
const FPolygonID PolygonID |
Return the number of internal edges in this polygon | |
| int32 | GetNumPolygonTriangles
(
const FPolygonID PolygonID |
Return the number of triangles which comprise this polygon | |
| int32 | GetNumPolygonVertices
(
const FPolygonID PolygonID |
Returns the number of vertices this polygon has | |
| int32 | Gets the number of UV element channels | ||
| int32 | GetNumVertexConnectedEdges
(
const FVertexID VertexID |
Returns number of edges connected to this vertex | |
| int32 | GetNumVertexConnectedPolygons
(
const FVertexID VertexID |
Returns the number of polygons connected to this vertex | |
| int32 | GetNumVertexConnectedTriangles
(
const FVertexID VertexID |
Returns number of triangles connected to this vertex | |
| int32 | GetNumVertexInstanceConnectedPolygons
(
const FVertexInstanceID VertexInstanceID |
Returns the number of polygons connected to this vertex instance. | |
| int32 | GetNumVertexInstanceConnectedTriangles
(
const FVertexInstanceID VertexInstanceID |
Returns the number of triangles connected to this vertex instance | |
| int32 | GetNumVertexVertexInstances
(
const FVertexID VertexID |
Returns number of vertex instances created from this vertex | |
| TArray< FPolygonID, Alloc > | GetPolygonAdjacentPolygons
(
const FPolygonID PolygonID |
Return adjacent polygons into a TArray with the specified allocator | |
| TArray< FPolygonID > | GetPolygonAdjacentPolygons
(
const FPolygonID PolygonID |
Return adjacent polygons to this polygon | |
| void | GetPolygonAdjacentPolygons
(
const FPolygonID PolygonID, |
Populates the passed array with adjacent polygons | |
| float | GetPolygonCornerAngleForVertex
(
const FPolygonID PolygonID, |
||
| TArrayView< const FPolygonID > | GetPolygonGroupPolygonIDs
(
const FPolygonGroupID PolygonGroupID |
Returns the polygons associated with the given polygon group | |
| TArrayView< const FTriangleID > | GetPolygonGroupTriangles
(
const FPolygonGroupID PolygonGroupID |
Returns the triangles associated with the given polygon group | |
| TArray< FEdgeID > | GetPolygonInternalEdges
(
const FPolygonID PolygonID |
Return the internal edges of this polygon, i.e. those which separate constituent triangles | |
| void | GetPolygonInternalEdges
(
const FPolygonID PolygonID, |
Populate the provided array with a list of edges which are internal to the polygon, i.e. those which separate constituent triangles. | |
| TArray< FEdgeID, Alloc > | GetPolygonInternalEdges
(
const FPolygonID PolygonID |
Return the internal edges of this polygon, i.e. those which separate constituent triangles | |
| void | GetPolygonPerimeterEdges
(
const FPolygonID PolygonID, |
Populates the passed array with the edges which form the polygon perimeter | |
| TArray< FEdgeID, Alloc > | GetPolygonPerimeterEdges
(
const FPolygonID PolygonID |
Returns the vertices which form the polygon perimeter as an array templated on the given allocator | |
| TArray< FEdgeID > | GetPolygonPerimeterEdges
(
const FPolygonID PolygonID |
Returns the vertices which form the polygon perimeter | |
| FPolygonGroupID | GetPolygonPolygonGroup
(
const FPolygonID PolygonID |
Return the polygon group associated with a polygon | |
| TArrayView< const FTriangleID > | GetPolygonTriangles
(
const FPolygonID PolygonID |
Return reference to an array of triangle IDs which comprise this polygon | |
| TArray< FVertexInstanceID, Alloc > | GetPolygonVertexInstances
(
const FPolygonID PolygonID |
||
| void | GetPolygonVertexInstances
(
const FPolygonID PolygonID, |
Returns reference to an array of VertexInstance IDs forming the perimeter of this polygon | |
| TArray< FVertexInstanceID > | GetPolygonVertexInstances
(
const FPolygonID PolygonID |
||
| TArray< FVertexID > | GetPolygonVertices
(
const FPolygonID PolygonID |
Returns the vertices which form the polygon perimeter | |
| void | GetPolygonVertices
(
const FPolygonID PolygonID, |
Populates the passed array of VertexIDs with the vertices which form the polygon perimeter | |
| TArray< FVertexID, Alloc > | GetPolygonVertices
(
const FPolygonID PolygonID |
Returns the vertices which form the polygon perimeter as an array templated on the given allocator | |
| void | GetTriangleAdjacentTriangles
(
const FTriangleID TriangleID, |
Populates the passed array with adjacent triangles | |
| TArray< FTriangleID > | GetTriangleAdjacentTriangles
(
const FTriangleID TriangleID |
Return adjacent triangles to this triangle | |
| TArray< FTriangleID, Alloc > | GetTriangleAdjacentTriangles
(
const FTriangleID TriangleID |
Return adjacent triangles into a TArray with the specified allocator | |
| float | GetTriangleCornerAngleForVertex
(
const FTriangleID TriangleID, |
||
| TArrayView< FEdgeID > | GetTriangleEdges
(
const FTriangleID TriangleID |
Return the edges which form this triangle | |
| FPolygonID | GetTrianglePolygon
(
const FTriangleID TriangleID |
Get the polygon which contains this triangle | |
| FPolygonGroupID | GetTrianglePolygonGroup
(
const FTriangleID TriangleID |
Get the polygon group which contains this triangle | |
| TArrayView< FUVID > | GetTriangleUVIndices
(
const FTriangleID TriangleID, |
Return UV indices for this triangle for the given channel | |
| FVertexInstanceID | GetTriangleVertexInstance
(
const FTriangleID TriangleID, |
Get the specified vertex instance by index | |
| TArrayView< const FVertexInstanceID > | GetTriangleVertexInstances
(
const FTriangleID TriangleID |
Get the vertex instances which define this triangle | |
| TArrayView< const FVertexID > | GetTriangleVertices
(
const FTriangleID TriangleID |
Return the vertices which define this triangle | |
| TArray< FVertexID > | GetVertexAdjacentVertices
(
const FVertexID VertexID |
Returns the vertices adjacent to this vertex | |
| TArray< FVertexID, Alloc > | GetVertexAdjacentVertices
(
const FVertexID VertexID |
Returns the vertices adjacent to this vertex as an array with the specified allocator template type. | |
| void | GetVertexAdjacentVertices
(
const FVertexID VertexID, |
Populates the passed array of VertexIDs with the vertices adjacent to this vertex | |
| TArrayView< const FEdgeID > | GetVertexConnectedEdgeIDs
(
const FVertexID VertexID |
Returns reference to an array of Edge IDs connected to this vertex | |
| TArray< FPolygonID, Alloc > | GetVertexConnectedPolygons
(
const FVertexID VertexID |
Returns the polygons connected to this vertex as an array with the specified allocator template type. | |
| TArray< FPolygonID > | GetVertexConnectedPolygons
(
const FVertexID VertexID |
Returns the polygons connected to this vertex | |
| void | GetVertexConnectedPolygons
(
const FVertexID VertexID, |
Populates the passed array of PolygonIDs with the polygons connected to this vertex | |
| TArray< FTriangleID, Alloc > | GetVertexConnectedTriangles
(
const FVertexID VertexID |
Returns the triangles connected to this vertex as an array with the specified allocator template type. | |
| TArray< FTriangleID > | GetVertexConnectedTriangles
(
const FVertexID VertexID |
Returns the triangles connected to this vertex | |
| void | GetVertexConnectedTriangles
(
const FVertexID VertexID, |
Populates the passed array of TriangleIDs with the triangles connected to this vertex | |
| void | GetVertexInstanceConnectedPolygons
(
const FVertexInstanceID VertexInstanceID, |
Populates the passed array with the polygons connected to this vertex instance | |
| TArray< FPolygonID > | GetVertexInstanceConnectedPolygons
(
const FVertexInstanceID VertexInstanceID |
Returns the polygons connected to this vertex instance | |
| TArray< FPolygonID, Alloc > | GetVertexInstanceConnectedPolygons
(
const FVertexInstanceID VertexInstanceID |
Returns the polygons connected to this vertex instance as an array with the specified allocator template type. | |
| TArrayView< const FTriangleID > | GetVertexInstanceConnectedTriangleIDs
(
const FVertexInstanceID VertexInstanceID |
Returns reference to an array of Triangle IDs connected to this vertex instance | |
| FVertexInstanceID | GetVertexInstanceForPolygonVertex
(
const FPolygonID PolygonID, |
Return the vertex instance which corresponds to the given vertex on the given polygon, or INDEX_NONE | |
| FVertexInstanceID | GetVertexInstanceForTriangleVertex
(
const FTriangleID TriangleID, |
Return the vertex instance which corresponds to the given vertex on the given triangle, or INDEX_NONE | |
| FEdgeID | GetVertexInstancePairEdge
(
const FVertexInstanceID VertexInstanceID0, |
Returns the edge ID defined by the two given vertex instance IDs, if there is one; otherwise INDEX_NONE | |
| FVertexID | GetVertexInstanceVertex
(
const FVertexInstanceID VertexInstanceID |
Returns the vertex ID associated with the given vertex instance | |
| FEdgeID | GetVertexPairEdge
(
const FVertexID VertexID0, |
Returns the edge ID defined by the two given vertex IDs, if there is one; otherwise INDEX_NONE | |
| FVector3f | GetVertexPosition
(
const FVertexID VertexID |
Returns the position of this vertex | |
| TVertexAttributesRef< const FVector3f > | |||
| TVertexAttributesRef< FVector3f > | |||
| TArrayView< const FVertexInstanceID > | GetVertexVertexInstanceIDs
(
const FVertexID VertexID |
Returns reference to an array of VertexInstance IDs instanced from this vertex | |
| bool | IsEdgeInternal
(
const FEdgeID EdgeID |
Determine whether a given edge is an internal edge between triangles of a polygon | |
| bool | IsEdgeInternalToPolygon
(
const FEdgeID EdgeID, |
Determine whether a given edge is an internal edge between triangles of a specific polygon | |
| bool | IsEdgeValid
(
const FEdgeID EdgeID |
Returns whether the passed edge ID is valid | |
| bool | IsEmpty () |
Return whether the mesh description is empty. | |
| bool | IsPolygonGroupValid
(
const FPolygonGroupID PolygonGroupID |
Returns whether the passed polygon group ID is valid | |
| bool | IsPolygonValid
(
const FPolygonID PolygonID |
Returns whether the passed polygon ID is valid | |
| bool | IsTrianglePartOfNgon
(
const FTriangleID TriangleID |
Determines if this triangle is part of an n-gon | |
| bool | IsTriangleValid
(
const FTriangleID TriangleID |
Returns whether the passed triangle ID is valid | |
| bool | Returns whether the passed UV ID is valid | ||
| bool | IsVertexInstanceValid
(
const FVertexInstanceID VertexInstanceID |
Returns whether the passed vertex instance ID is valid | |
| bool | IsVertexOrphaned
(
const FVertexID VertexID |
Returns whether a given vertex is orphaned, i.e. it doesn't form part of any polygon | |
| bool | IsVertexValid
(
const FVertexID VertexID |
Returns whether the passed vertex ID is valid | |
| bool | NeedsCompact () |
Determines if calling Compact() would perform actual compaction or not. | |
| const TAttributesSet< FPolygonID > & | |||
| TAttributesSet< FPolygonID > & | |||
| const TAttributesSet< FPolygonGroupID > & | |||
| TAttributesSet< FPolygonGroupID > & | |||
| const FPolygonGroupArray & | |||
| FPolygonGroupArray & | |||
| FPolygonArray & | Polygons () |
||
| const FPolygonArray & | Polygons () |
||
| void | |||
| void | Remap
(
const FElementIDRemappings& Remappings |
Remaps the element IDs in the mesh description according to the passed in object | |
| void | RemapPolygonGroups
(
const TMap< FPolygonGroupID, FPolygonGroupID >& Remap |
Remaps polygon groups according to the supplied map | |
| void | ReserveNewEdges
(
const int32 NumEdges |
Reserves space for this number of new edges | |
| void | ReserveNewPolygonGroups
(
const int32 NumPolygonGroups |
Reserves space for this number of new polygon groups | |
| void | ReserveNewPolygons
(
const int32 NumPolygons |
Reserves space for this number of new polygons | |
| void | ReserveNewTriangles
(
const int32 NumTriangles |
Reserves space for this number of new triangles | |
| void | ReserveNewUVs
(
const int32 NumUVs, |
Reserves space for this number of new UVs | |
| void | ReserveNewVertexInstances
(
const int32 NumVertexInstances |
Reserves space for this number of new vertex instances | |
| void | ReserveNewVertices
(
const int32 NumVertices |
Reserves space for this number of new vertices | |
| void | Operations on all the indexers. | ||
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | Reverses the winding order of all polygons in the mesh | ||
| void | ReversePolygonFacing
(
const FPolygonID PolygonID |
Reverse the winding order of the vertices of this polygon | |
| void | ReverseTriangleFacing
(
const FTriangleID TriangleID |
Reverse the winding order of the vertices of this triangle | |
| void | Serialize the mesh description. | ||
| void | SerializeLegacy
(
FArchive& Ar |
Legacy serialization for old assets. | |
| void | SetNumUVChannels
(
const int32 NumUVChannels |
Sets the specified number of UV channels | |
| void | SetPolygonPolygonGroup
(
const FPolygonID PolygonID, |
Sets the polygon group associated with a polygon | |
| void | SetPolygonVertexInstance
(
const FPolygonID PolygonID, |
Set the vertex instance at the given index around the polygon to the new value | |
| void | SetPolygonVertexInstances
(
const FPolygonID PolygonID, |
Set the vertex instance at the given index around the polygon to the new value | |
| void | SetTriangleUVIndices
(
const FTriangleID TriangleID, |
Set the UV indices for this triangle | |
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| void | TransferPolygonGroup
(
FPolygonGroupID SourceID, |
Transfer the source polygon group data to the destination polygon group. | |
| TAttributesSet< FTriangleID > & | |||
| const TAttributesSet< FTriangleID > & | |||
| FTriangleArray & | Triangles () |
||
| const FTriangleArray & | Triangles () |
||
| void | Retriangulates the entire mesh | ||
| TAttributesSet< FUVID > & | UVAttributes
(
int32 Index |
||
| const TAttributesSet< FUVID > & | UVAttributes
(
int32 Index |
||
| const FUVArray & | UVs
(
int32 Index |
||
| FUVArray & | UVs
(
int32 Index |
||
| TAttributesSet< FVertexID > & | |||
| const TAttributesSet< FVertexID > & | |||
| TAttributesSet< FVertexInstanceID > & | |||
| const TAttributesSet< FVertexInstanceID > & | |||
| FVertexInstanceArray & | |||
| const FVertexInstanceArray & | |||
| FVertexArray & | Vertices () |
||
| const FVertexArray & | Vertices () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FMeshDescription & | operator=
(
const FMeshDescription& |
||
| FMeshDescription & | operator=
(
FMeshDescription&& |
Constants
| Name | Description |
|---|---|
| EdgesName | |
| PolygonGroupsName | |
| PolygonsName | |
| TrianglesName | |
| UVsName | |
| VertexInstancesName | |
| VerticesName |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| TArray< FTriangleID > | GetEdgeConnectedTriangles
(
const FEdgeID EdgeID |
Please use GetEdgeConnectedTriangleIDs() instead. | |
| TArray< FPolygonID > | GetPolygonGroupPolygons
(
const FPolygonGroupID PolygonGroupID |
Please use GetPolygonGroupPolygonIDs() instead. | |
| TArray< FTriangleID > | GetPolygonTriangleIDs
(
const FPolygonID PolygonID |
Please use GetPolygonTriangles() instead. | |
| void | GetTriangleEdges
(
const FTriangleID TriangleID, |
Use the other form of GetTriangleEdges | |
| void | GetTriangleVertices
(
const FTriangleID TriangleID, |
Use the other form of GetTriangleVertices | |
| TArray< FEdgeID > | GetVertexConnectedEdges
(
const FVertexID VertexID |
Please use GetVertexConnectedEdgeIDs instead. | |
| TArray< FTriangleID > | GetVertexInstanceConnectedTriangles
(
const FVertexInstanceID VertexInstanceID |
Please use GetVertexInstanceTriangleIDs() instead. | |
| TArray< FVertexInstanceID > | GetVertexVertexInstances
(
const FVertexID VertexID |
Please use GetVertexVertexInstanceIDs instead. |