FStaticMeshOperations

Windows
MacOS
Linux

References

Module

StaticMeshDescription

Header

/Engine/Source/Runtime/StaticMeshDescription/Public/StaticMeshOperations.h

Include

#include "StaticMeshOperations.h"

Syntax

class FStaticMeshOperations

Functions

Name Description

Public function Static

bool

 

AddUVChannel

(
    FMeshDescription& MeshDescription
)

Add a UV channel to the MeshDescription.

Public function Static

void

 

AppendMeshDescription

(
    const FMeshDescription& SourceMesh,
    FMeshDescription& TargetMesh,
    FAppendSettings& AppendSettings
)

Public function Static

void

 

ApplyTransform

(
    FMeshDescription& MeshDescription,
    const FTransform& Transform
)

Transforms the MeshDescription data using the provided transform.

Public function Static

void

 

AreNormalsAndTangentsValid

(
    const FMeshDescription& MeshDescri...,
    bool& bHasInvalidNormals,
    bool& bHasInvalidTangents
)

Public function Static

void

 

BuildWeldedVertexIDRemap

(
    const FMeshDescription& MeshDescri...,
    const float WeldingThreshold,
    TMap< FVertexID, FVertexID >& OutV...
)

Public function Static

void

 

ComputeMikktTangents

(
    FMeshDescription& MeshDescription,
    bool bIgnoreDegenerateTriangles
)

Compute tangent and Bi-Normal using mikkt space for every vertex in the mesh description.

Public function Static

void

 

ComputePolygonTangentsAndNormals

(
    FMeshDescription& MeshDescription,
    float ComparisonThreshold
)

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

Public function Static

FSHAHash

 

ComputeSHAHash

(
    const FMeshDescription& MeshDescri...,
    bool bSkipTransientAttributes
)

Computes the SHA hash of all the attributes values in the MeshDescription.

Public function Static

void

 

ComputeTangentsAndNormals

(
    FMeshDescription& MeshDescription,
    EComputeNTBsFlags ComputeNTBsOption...
)

Recompute any invalid normal, tangent or Bi-Normal for every vertex in the mesh description with the given options.

Public function Static

void

 

ConvertFromRawMesh

(
    const FRawMesh& SourceRawMesh,
    FMeshDescription& DestinationMeshD...,
    const TMap< int32, FName >& Materi...,
    bool bSkipNormalsAndTangents
)

Convert old FRawMesh format to MeshDescription.

Public function Static

void

 

ConvertHardEdgesToSmoothGroup

(
    const FMeshDescription& SourceMesh...,
    TArray< uint32 >& FaceSmoothingMas...
)

Public function Static

void

 

ConvertSmoothGroupToHardEdges

(
    const TArray< uint32 >& FaceSmooth...,
    FMeshDescription& DestinationMeshD...
)

Public function Static

void

 

ConvertToRawMesh

(
    const FMeshDescription& SourceMesh...,
    FRawMesh& DestinationRawMesh,
    const TMap< FName, int32 >& Materi...
)

Convert this mesh description into the old FRawMesh format.

Public function Static

bool

 

CreateLightMapUVLayout

(
    FMeshDescription& MeshDescription,
    int32 SrcLightmapIndex,
    int32 DstLightmapIndex,
    int32 MinLightmapResolution,
    ELightmapUVVersion LightmapUVVersio...,
    const FOverlappingCorners& Overlap...
)

Find and pack UV charts for lightmap.

Public function Static

void

 

DetermineEdgeHardnessesFromVertexInstanceNormals

(
    FMeshDescription& MeshDescription,
    float Tolerance
)

Determine the edge hardnesses from existing normals

Public function Static

void

 

FindOverlappingCorners

(
    FOverlappingCorners& OverlappingCo...,
    const FMeshDescription& MeshDescri...,
    float ComparisonThreshold
)

Find all overlapping vertex using the threshold in the mesh description.

Public function Static

void

 

FlipPolygons

(
    FMeshDescription& MeshDescription
)

Flip the facing for a set of input polygons.

Public function Static

void

 

GenerateBoxUV

(
    const FMeshDescription& MeshDescri...,
    const FUVMapParameters& Params,
    TMap< FVertexInstanceID, FVector2D ...
)

Generate box UV mapping for the MeshDescription

Public function Static

void

 

GenerateCylindricalUV

(
    FMeshDescription& MeshDescription,
    const FUVMapParameters& Params,
    TMap< FVertexInstanceID, FVector2D ...
)

Generate cylindrical UV mapping for the MeshDescription

Public function Static

void

 

GeneratePlanarUV

(
    const FMeshDescription& MeshDescri...,
    const FUVMapParameters& Params,
    TMap< FVertexInstanceID, FVector2D ...
)

Generate planar UV mapping for the MeshDescription

Public function Static

bool

 

GenerateUniqueUVsForStaticMesh

(
    const FMeshDescription& MeshDescri...,
    int32 TextureResolution,
    bool bMergeIdenticalMaterials,
    TArray< FVector2D >& OutTexCoords
)

Create some UVs from the specified mesh description data.

Public function Static

int32

 

GetUVChartCount

(
    FMeshDescription& MeshDescription,
    int32 SrcLightmapIndex,
    ELightmapUVVersion LightmapUVVersio...,
    const FOverlappingCorners& Overlap...
)

Find all charts in the mesh description.

Public function Static

bool

 

HasVertexColor

(
    const FMeshDescription& MeshDescri...
)

Public function Static

bool

 

InsertUVChannel

(
    FMeshDescription& MeshDescription,
    int32 UVChannelIndex
)

Insert a UV channel at the given index to the MeshDescription.

Public function Static

void

 

RecomputeNormalsAndTangentsIfNeeded

(
    FMeshDescription& MeshDescription,
    EComputeNTBsFlags ComputeNTBsOption...
)

Make sure all normals and tangents are valid. If not, recompute them.

Public function Static

bool

 

RemoveUVChannel

(
    FMeshDescription& MeshDescription,
    int32 UVChannelIndex
)

Remove the UV channel at the given index from the MeshDescription.

Public function Static

void

 

SwapPolygonPolygonGroup

(
    FMeshDescription& MeshDescription,
    int32 SectionIndex,
    int32 TriangleIndexStart,
    int32 TriangleIndexEnd,
    bool bRemoveEmptyPolygonGroup
)

Move some polygon to a new PolygonGroup(section) SectionIndex: The target section we want to assign the polygon.

Classes

Name

Description

Public struct

FAppendSettings

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