IMeshPaintGeometryAdapter

Interface for a class to provide mesh painting support for a subclass of [UMeshComponent](API\Runtime\Engine\Components\UMeshComponent)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

MeshPaint

Header

/Engine/Source/Editor/MeshPaint/Public/IMeshPaintGeometryAdapter.h

Include

#include "IMeshPaintGeometryAdapter.h"

Syntax

class IMeshPaintGeometryAdapter

Remarks

Interface for a class to provide mesh painting support for a subclass of UMeshComponent

Destructors

Name Description

Public function Virtual

~IMeshPaintGeometryAdapter()

D-tor

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Reference collecting to prevent GC-ing

Public function Const

void

 

ApplyOrRemoveTextureOverride

(
    UTexture* SourceTexture,
    UTexture* OverrideTexture
)

Applies or removes an override texture to use while rendering the meshes materials

Public function

bool

 

Construct

(
    UMeshComponent* InComponent,
    int32 MeshLODIndex
)

Constructs the adapter for a specific LOD index using the mesh component

Public function Static

void

 

DefaultApplyOrRemoveTextureOverride

(
    UMeshComponent* InMeshComponen...,
    UTexture* SourceTexture,
    UTexture* OverrideTexture
)

Default functionality for applying or remove a texture override

Public function Static

void

 

DefaultQueryPaintableTextures

(
    int32 MaterialIndex,
    const UMeshComponent* MeshComp...,
    int32& OutDefaultIndex,
    TArray< struct FPaintableTexture > ...
)

Default functionality for querying textures from a mesh component which are suitable for texture painting

Public function Const

FMatrix

 

GetComponentToWorldMatrix()

Returns the Component to World matrix from the Mesh Component

Public function Const

void

 

GetInfluencedVertexData

(
    const float ComponentSpaceSquaredBr...,
    const FVector& ComponentSpaceBrush...,
    const FVector& ComponentSpaceCamer...,
    const bool bOnlyFrontFacing,
    TArray< TPair< int32, FVector >>& ...
)

Retrieves the influenced vertex indices and positions that intersect the given sphere

Public function Const

void

 

GetInfluencedVertexIndices

(
    const float ComponentSpaceSquaredBr...,
    const FVector& ComponentSpaceBrush...,
    const FVector& ComponentSpaceCamer...,
    const bool bOnlyFrontFacing,
    TSet< int32 >& InfluencedVertices
)

Retrieves the influenced vertex indices which intersect the given sphere

Public function Const

const TArray...

 

GetMeshIndices()

Returns the indices for the current LOD index in the Mesh

Public function Const

const TArray...

 

GetMeshVertices()

Returns the vertices for the current LOD index in the Mesh

Public function Const

void

 

GetTextureCoordinate

(
    int32 VertexIndex,
    int32 ChannelIndex,
    FVector2D& OutTextureCoordinate
)

Returns the Texture Coordinate at Vertex Index from the Mesh

Public function Const

void

 

GetVertexColor

(
    int32 VertexIndex,
    FColor& OutColor,
    bool bInstance
)

Returns the Vertex Color at Vertex Index from the Mesh

Public function Const

void

 

GetVertexPosition

(
    int32 VertexIndex,
    FVector& OutVertex
)

Returns the Vertex Position at Vertex Index from the Mesh

Public function

bool

 

Initialize()

Returns whether or not initialization of necessary data was successful

Public function Const

bool

 

IsValid()

Returns whether or not this adapter is in a valid state

Public function Const

bool

 

LineTraceComponent

(
    FHitResult& OutHit,
    const FVector Start,
    const FVector End,
    const FCollisionQueryParams& Param...
)

Returns the result of tracing a line on the component represented by this adapter

Public function

void

 

OnAdded()

Called when this adapter is created and added to its owner (used for setting up)

Public function

void

 

OnRemoved()

Called when this adapter is removed from its owner and deleted (used for cleaning up)

Public function

void

 

PostEdit()

Post Edit to clear up or update necessary data

Public function

void

 

PreEdit()

Pre Edit to setup necessary data

Public function

void

 

QueryPaintableTextures

(
    int32 MaterialIndex,
    int32& OutDefaultIndex,
    TArray< struct FPaintableTexture > ...
)

Retrieves a list of textures which are suitable for painting

Public function

void

 

SetVertexColor

(
    int32 VertexIndex,
    FColor Color,
    bool bInstance
)

Sets the Vertex Color at Vertex Index to Color inside of the Mesh

Public function Const

TArray< uint...

 

SphereIntersectTriangles

(
    const float ComponentSpaceSquaredBr...,
    const FVector& ComponentSpaceBrush...,
    const FVector& ComponentSpaceCamer...,
    const bool bOnlyFrontFacing
)

Returns the triangle indices which intersect with the given sphere

Public function Const

TArray< FVec...

 

SphereIntersectVertices

(
    const float ComponentSpaceSquaredBr...,
    const FVector& ComponentSpaceBrush...,
    const FVector& ComponentSpaceCamer...,
    const bool bOnlyFrontFacing
)

Returns the vertex positions which intersect the given sphere

Public function Const

bool

 

SupportsTexturePaint()

Whether or not this adapter supports texture painting

Public function Const

bool

 

SupportsVertexPaint()

Whether or not this adapter supports vertex painting

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