UEditableMesh

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

EditableMesh

Header

/Engine/Plugins/Runtime/EditableMesh/Source/EditableMesh/Public/EditableMesh.h

Include

#include "EditableMesh.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType)
class UEditableMesh : public UObject

Variables

Name Description

Public variable UProperty

TArray< UEditab...

 

Adapters

Adapters registered with this editable mesh

Public variable

bool

 

bAllowCompact

True if compact is enabled on this mesh.

Public variable

bool

 

bAllowSpatialDatabase

Spatial databaseTrue if we should generate and maintain an octree spatial database for this mesh.

Public variable

bool

 

bAllowUndo

True if undo features are enabled on this mesh.

Public variable

bool

 

bIsBeingModified

True if StartModification() has been called.

Public variable

EMeshModificati...

 

CurrentModificationType

While the mesh is being edited (between calls to StartModification() and EndModification()), this is the type of modification being performed

Public variable

EMeshTopologyCh...

 

CurrentToplogyChange

While the mesh is being edited (between calls to StartModification() and EndModification()), stores whether topology could be affected

Public variable

TSet< FPolygonI...

 

DeletedOctreePolygonIDs

Polygons that were deleted since the last time our octree was refreshed

Public variable

FElementIDsRema...

 

ElementIDsRemappedEvent

Broadcast event when element IDs are remapped (for example, following Compact / Uncompact)

Public variable

FMeshDescriptio...

 

MeshDescription

Pointer to the active mesh description for this editable mesh

Public variable

TSet< FPolygonI...

 

NewOctreePolygonIDs

Newly-created polygons since the last time our octree was refreshed

Public variable

TSharedPtr< cla...

 

Octree

Octree to accelerate spatial queries against the mesh.

Public variable

FMeshDescriptio...

 

OwnedMeshDescription

Owned mesh description for this editable mesh

Public variable UProperty

int32

 

PendingCompactCounter

Counter to determine when we should compact data

Public variable

TMap< FPolygonI...

 

PolygonIDToOctreeElementIDMap

Maps our polygon IDs to octree element IDs

Public variable

TSet< FPolygonI...

 

PolygonsPendingFlipTangentBasis

List of polygons which need their tangent basis flipped (and consequently their associated vertex instances)

Public variable

TSet< FPolygonI...

 

PolygonsPendingNewTangentBasis

List of polygons which need their tangent basis recalculating (and consequently their associated vertex instances)

Public variable

TSet< FPolygonI...

 

PolygonsPendingTriangulation

List of polygons requiring retriangulation

Public variable

UEditableMeshAd...

 

PrimaryAdapter

Public variable UProperty Category BlueprintReadOnly

int32

 

SubdivisionCount

How many levels to subdivide this mesh. Zero will turn off subdivisions

Public variable

FSubdivisionLim...

 

SubdivisionLimitData

The resulting limit surface geometry after GenerateOpenSubdivLimitSurfaceData() is called

Public variable

FEditableMeshSu...

 

SubMeshAddress

The sub-mesh we came from

Public variable UProperty Category BlueprintReadOnly

int32

 

TextureCoordinateCount

The number of texture coordinates stored on the vertices of this mesh

Public variable

TUniquePtr< FCo...

 

Undo

When bAllowUndo is enabled, this will store the changes that can be applied to revert anything that happened to this mesh since the last time that MakeUndo() was called.

Public variable

TSet< FVertexID...

 

VerticesPendingMerging

List of candidate vertices for merging instances

Constructors

Name Description

Public function

UEditableMesh()

Default constructor that initializes good defaults for UEditableMesh

Functions

Name Description

Protected function

void

 

AddUndo

(
    TUniquePtr< FChange > NewUndo
)

Adds a new change that can be used to undo a modification that happened to the mesh.

Public function Const UFunction BlueprintPure, Category

bool

 

AnyChangesToUndo()

Public function

void

 

Compact()

Compacts mesh element arrays to remove gaps, and fixes up referenced IDs

Public function Const

FTriangleID

 

ComputeBarycentricWeightForPointOnPolygon

(
    const FPolygonID PolygonID,
    const FVector PointOnPolygon,
    FVector& OutTriangleVertexWeights
)

Protected function

void

 

CreatePolygonContour

(
    const TArray< FVertexAndAttributes ...,
    TArray< FEdgeID >& OutEdgeIDs,
    TArray< FVertexInstanceID >& OutVe...
)

Protected function

FVertexInsta...

 

CreateVertexInstanceForContourVertex

(
    const FVertexAndAttributes& Contou...,
    const FPolygonID PolygonID
)

Public function

void

 

GeometryHitTest

(
    const FHitParamsIn& InParams,
    FHitParamsOut& OutParams
)

Statics

Protected function Const

void

 

GetConnectedSoftEdges

(
    const FVertexID VertexID,
    TArray< FEdgeID >& OutConnectedSof...
)

Public function Const UFunction BlueprintPure, Category

FPolygonID

 

GetEdgeConnectedPolygon

(
    const FEdgeID EdgeID,
    const int32 ConnectedPolygonNumber
)

Returns the indexed polygon connected to this edge

Public function Const UFunction BlueprintPure, Category

int32

 

GetEdgeConnectedPolygonCount

(
    const FEdgeID EdgeID
)

Returns the number of polygons connected to this edge

Public function Const UFunction BlueprintPure, Category

int32

 

GetEdgeCount()

Returns the number of edges in this mesh

Public function Const UFunction BlueprintPure, Category

FVertexID

 

GetEdgeVertex

(
    const FEdgeID EdgeID,
    const int32 EdgeVertexNumber
)

Returns the given indexed vertex for this edge. EdgeVertexNumber must be 0 or 1.

Public function Const UFunction BlueprintPure, Category

FPolygonGrou...

 

GetGroupForPolygon

(
    const FPolygonID PolygonID
)

Returns the polygon group this polygon is assigned to

Public function Const

const FMeshD...

 

GetMeshDescription()

Public function

FMeshDescrip...

 

GetMeshDescription()

Public function Const UFunction BlueprintPure, Category

int32

 

GetPolygonCount()

Returns the number of polygons in this mesh

Public function Const UFunction BlueprintPure, Category

int32

 

GetPolygonCountInGroup

(
    const FPolygonGroupID PolygonGroupI...
)

Returns the number of polygons in this polygon group

Public function Const UFunction BlueprintPure, Category

int32

 

GetPolygonGroupCount()

Returns the number of polygon groups in this mesh

Public function Const UFunction BlueprintPure, Category

FPolygonID

 

GetPolygonInGroup

(
    const FPolygonGroupID PolygonGroupI...,
    const int32 PolygonNumber
)

Returns the given indexed polygon in this polygon group

Public function Const UFunction BlueprintPure, Category

FVertexID

 

GetPolygonPerimeterVertex

(
    const FPolygonID PolygonID,
    const int32 PolygonVertexNumber
)

Returns the indexed vertex on this polygon's perimeter

Public function Const UFunction BlueprintPure, Category

int32

 

GetPolygonPerimeterVertexCount

(
    const FPolygonID PolygonID
)

Returns the number of vertices on this polygon's perimeter

Public function Const UFunction BlueprintPure, Category

FVertexInsta...

 

GetPolygonPerimeterVertexInstance

(
    const FPolygonID PolygonID,
    const int32 PolygonVertexNumber
)

Returns the indexed vertex instance on this polygon's perimeter

Protected function Const

void

 

GetPolygonsInSameSoftEdgedGroupAsPolygon

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

Public function Const UFunction BlueprintPure, Category

FTriangleID

 

GetPolygonTriangulatedTriangle

(
    const FPolygonID PolygonID,
    int32 PolygonTriangleNumber
)

Returns the indexed triangle of the triangulated polygon

Public function Const UFunction BlueprintPure, Category

int32

 

GetPolygonTriangulatedTriangleCount

(
    const FPolygonID PolygonID
)

Returns the number of triangles which make up this polygon

Public function Const

const FEdita...

 

GetSubMeshAddress()

Gets the sub-mesh address for this mesh which uniquely identifies the mesh among other sub-meshes in the same component

Public function Const UFunction BlueprintPure, Category

FEdgeID

 

GetVertexConnectedEdge

(
    const FVertexID VertexID,
    const int32 ConnectedEdgeNumber
)

Returns the requested edge connected to this vertex

Public function Const UFunction BlueprintPure, Category

int32

 

GetVertexConnectedEdgeCount

(
    const FVertexID VertexID
)

Returns the number of edges connected to this vertex

Protected function Const

void

 

GetVertexConnectedPolygonsInSameSoftEdgedGroup

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

Public function Const UFunction BlueprintPure, Category

int32

 

GetVertexCount()

Returns the number of vertices in this mesh

Public function Const UFunction BlueprintPure, Category

FPolygonID

 

GetVertexInstanceConnectedPolygon

(
    const FVertexInstanceID VertexInsta...,
    const int32 ConnectedPolygonNumber
)

Returns the indexed polygon connected to this vertex instance

Public function Const UFunction BlueprintPure, Category

int32

 

GetVertexInstanceConnectedPolygonCount

(
    const FVertexInstanceID VertexInsta...
)

Returns the number of polygons connected to this vertex instance

Public function Const UFunction BlueprintPure, Category

int32

 

GetVertexInstanceCount()

Returns the number of vertex instances in this mesh

Protected function Const

FVertexInsta...

 

GetVertexInstanceInPolygonForVertex

(
    const FPolygonID PolygonID,
    const FVertexID VertexID
)

Public function Const UFunction BlueprintPure, Category

FVertexID

 

GetVertexInstanceVertex

(
    const FVertexInstanceID VertexInsta...
)

Returns the vertex ID which the given vertex instance is instancing

Public function Const UFunction BlueprintPure, Category

bool

 

IsCompactAllowed()

Public function Const UFunction BlueprintPure, Category

bool

 

IsOrphanedVertex

(
    const FVertexID VertexID
)

Returns whether the given vertex ID is orphaned

Public function Const UFunction BlueprintPure, Category

bool

 

IsSpatialDatabaseAllowed()

Public function Const UFunction BlueprintPure, Category

bool

 

IsUndoAllowed()

Public function Const UFunction BlueprintPure, Category

bool

 

IsValidEdge

(
    const FEdgeID EdgeID
)

Returns whether the given edge ID is valid

Public function Const UFunction BlueprintPure, Category

bool

 

IsValidPolygon

(
    const FPolygonID PolygonID
)

Returns whether the given polygon ID is valid

Public function Const UFunction BlueprintPure, Category

bool

 

IsValidPolygonGroup

(
    const FPolygonGroupID PolygonGroupI...
)

Returns whether the given polygon group ID is valid

Public function Const UFunction BlueprintPure, Category

bool

 

IsValidVertex

(
    const FVertexID VertexID
)

Returns whether the given vertex ID is valid

Public function

TUniquePtr< ...

 

MakeUndo()

Grabs any outstanding changes to this mesh and returns a change that can be used to undo those changes.

Public function

FElementIDsR...

 

OnElementIDsRemapped()

Public function

void

 

RebuildOctree()

Rebuilds the octree

Protected function

void

 

RemapOctreeIDs

(
    const FElementIDRemappings& Remapp...
)

Given a set of index remappings, fixes up references in the octree

Protected function

void

 

ReplaceVertexInstanceInPolygons

(
    const FVertexInstanceID OldVertexIn...,
    const FVertexInstanceID NewVertexIn...,
    const TArray< FPolygonID >& Polygo...
)

Protected function Const

void

 

SearchSpatialDatabaseWithPredicate

(
    TFunctionRef< bool&Boun...,
    TArray< FPolygonID >& OutPolygons
)

Public function UFunction BlueprintCallable, Category

void

 

SetAllowCompact

(
    const bool bInAllowCompact
)

Sets whether the mesh can be sporadically compacted as modifications are performed

Public function UFunction BlueprintCallable, Category

void

 

SetAllowSpatialDatabase

(
    const bool bInAllowSpatialDatabase
)

Sets whether this mesh should automatically generate and maintain an octree spatial database.

Public function UFunction BlueprintCallable, Category

void

 

SetAllowUndo

(
    const bool bInAllowUndo
)

Sets whether undo is allowed on this mesh

Protected function

void

 

SetEdgeAttribute

(
    const FEdgeID EdgeID,
    const FMeshElementAttributeData& A...
)

Public function

void

 

SetMeshDescription

(
    FMeshDescription* InMeshDescri...
)

Protected function

void

 

SetPolygonAttribute

(
    const FPolygonID PolygonID,
    const FMeshElementAttributeData& A...
)

Protected function

void

 

SetPolygonContourVertexAttributes

(
    const FPolygonID PolygonID,
    const TArray< FMeshElementAttribute...
)

Protected function

void

 

SetPolygonGroupAttribute

(
    const FPolygonGroupID PolygonGroupI...,
    const FMeshElementAttributeData& A...
)

Public function

void

 

SetSubMeshAddress

(
    const FEditableMeshSubMeshAddress&...
)

Called at initialization time to set this mesh's sub-mesh address

Protected function

void

 

SetVertexAttribute

(
    const FVertexID VertexID,
    const FMeshElementAttributeData& A...
)

Protected function

void

 

SetVertexInstanceAttribute

(
    const FVertexInstanceID VertexInsta...,
    const FMeshElementAttributeData& A...
)

Protected function

void

 

SplitVertexInstanceInPolygons

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

Protected function

void

 

SplitVerticesIfNecessary

(
    const TArray< FVertexID >& Vertice...
)

Public function

void

 

Uncompact

(
    const FElementIDRemappings& Remapp...
)

Remaps mesh element arrays according to the provided remappings, in order to undo a compact operation

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Name

Description

Public class

FElementIDsRemapped

Constants

Name

Description

CompactFrequency

Data will be compacted after this many topology modifying actions.

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