UProceduralMeshComponent

Component that allows you to specify custom triangle mesh geometry Beware! This feature is experimental and may be substantially changed in future releases.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ProceduralMeshComponent

Header

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

Include

#include "ProceduralMeshComponent.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(HideCategories=(Object, LOD), Meta=(BlueprintSpawnableComponent), ClassGroup=Rendering)
class UProceduralMeshComponent :
    public UMeshComponent,
    public IInterface_CollisionDataProvider

Remarks

Component that allows you to specify custom triangle mesh geometry Beware! This feature is experimental and may be substantially changed in future releases.

Variables

Name Description

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

bool

 

bUseAsyncCooking

Controls whether the physics cooking should be done off the game thread.

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

bool

 

bUseComplexAsSimpleCollision

Controls whether the complex (Per poly) geometry should be treated as 'simple' collision.

Public variable UProperty instanced

UBodySetup *...

 

ProcMeshBodySetup

Collision data

Constructors

Name Description

Public function

UProceduralMeshComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function UFunction BlueprintCallable, Category

void

 

AddCollisionConvexMesh

(
    TArray< FVector > ConvexVerts
)

Add simple collision convex to this component

Public function UFunction BlueprintCallable, Category

void

 

ClearAllMeshSections()

Clear all mesh sections and reset to empty state

Public function UFunction BlueprintCallable, Category

void

 

ClearCollisionConvexMeshes()

Add simple collision convex to this component

Public function UFunction BlueprintCallable, Category

void

 

ClearMeshSection

(
    int32 SectionIndex
)

Clear a section of the procedural mesh. Other sections do not change index.

Public function

void

 

CreateMeshSection

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< int32 >& Triangles,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FVector2D >& UV1,
    const TArray< FVector2D >& UV2,
    const TArray< FVector2D >& UV3,
    const TArray< FColor >& VertexColo...,
    const TArray< FProcMeshTangent >& ...,
    bool bCreateCollision
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

CreateMeshSection

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< int32 >& Triangles,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FColor >& VertexColo...,
    const TArray< FProcMeshTangent >& ...,
    bool bCreateCollision
)

Create/replace a section for this procedural mesh component.

Public function UFunction BlueprintCallable, Category, Meta

void

 

CreateMeshSection_LinearColor

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< int32 >& Triangles,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FVector2D >& UV1,
    const TArray< FVector2D >& UV2,
    const TArray< FVector2D >& UV3,
    const TArray< FLinearColor >& Vert...,
    const TArray< FProcMeshTangent >& ...,
    bool bCreateCollision
)

Create/replace a section for this procedural mesh component.

Public function

void

 

CreateMeshSection_LinearColor

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< int32 >& Triangles,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FLinearColor >& Vert...,
    const TArray< FProcMeshTangent >& ...,
    bool bCreateCollision
)

Public function Const UFunction BlueprintCallable, Category

int32

 

GetNumSections()

Returns number of sections currently created for this component

Public function

FProcMeshSec...

 

GetProcMeshSection

(
    int32 SectionIndex
)

Get pointer to internal data for one section of this procedural mesh component.

Public function Const UFunction BlueprintCallable, Category

bool

 

IsMeshSectionVisible

(
    int32 SectionIndex
)

Returns whether a particular section is currently visible

Public function

void

 

SetCollisionConvexMeshes

(
    const TArray< TArray< FVector > >&...
)

Function to replace all simple collision in one go

Public function UFunction BlueprintCallable, Category

void

 

SetMeshSectionVisible

(
    int32 SectionIndex,
    bool bNewVisibility
)

Control visibility of a particular section

Public function

void

 

SetProcMeshSection

(
    int32 SectionIndex,
    const FProcMeshSection& Section
)

Replace a section with new section geometry

Public function UFunction BlueprintCallable, Category, Meta

void

 

UpdateMeshSection

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FColor >& VertexColo...,
    const TArray< FProcMeshTangent >& ...
)

Updates a section of this procedural mesh component.

Public function

void

 

UpdateMeshSection

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FVector2D >& UV1,
    const TArray< FVector2D >& UV2,
    const TArray< FVector2D >& UV3,
    const TArray< FColor >& VertexColo...,
    const TArray< FProcMeshTangent >& ...
)

Public function

void

 

UpdateMeshSection_LinearColor

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FLinearColor >& Vert...,
    const TArray< FProcMeshTangent >& ...
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

UpdateMeshSection_LinearColor

(
    int32 SectionIndex,
    const TArray< FVector >& Vertices,
    const TArray< FVector >& Normals,
    const TArray< FVector2D >& UV0,
    const TArray< FVector2D >& UV1,
    const TArray< FVector2D >& UV2,
    const TArray< FVector2D >& UV3,
    const TArray< FLinearColor >& Vert...,
    const TArray< FProcMeshTangent >& ...
)

Updates a section of this procedural mesh component.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Public function Virtual Const

UMaterialInt...

 

GetMaterialFromCollisionFaceIndex

(
    int32 FaceIndex,
    int32& SectionIndex
)

Try and retrieve the material applied to a particular collision face of mesh.

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

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

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual Const

bool

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

Interface for checking if the implementing objects contains triangle mesh collision data

Public function Virtual

bool

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData* Collisi...,
    bool InUseAllTriData
)

Interface for retrieving triangle mesh collision data from the implementing object

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

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