Language:
Discover
By Skill Level
By Category

UProceduralMeshComponent

Choose your OS:

Inheritance Hierarchy

Syntax

UCLASS ([HideCategories=(Object, LOD)](Programming/UnrealArchitecture/Reference/Classes/Specifiers/HideCategories), Meta=(BlueprintSpawnableComponent), [ClassGroup=Rendering](Programming/UnrealArchitecture/Reference/Classes/Specifiers/ClassGroup))
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 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 < FLinearColor >& Vert...,
    const TArray < FProcMeshTangent >& ...,
    bool bCreateCollision
)

Create/replace a section for this procedural mesh component.

Public function 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 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 UFunction BlueprintCallable, Category, Meta

void

 

UpdateMeshSection_LinearColor

(
    int32 SectionIndex,
    const TArray < FVector >& Vertices,
    const TArray < FVector >& Normals,
    const TArray < FVector2D >& UV0,
    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

UMaterialInt ...

 

GetMaterialFromCollisionFaceIndex

(
    int32 FaceIndex,
    int32 & SectionIndex
)

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

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual

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

References