FMeshRefinerBase

This is a base class that implements common functionality for various triangle mesh resampling strategies (ie [FRemesher](API\Plugins\DynamicMesh\FRemesher) and FReducer).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/MeshRefinerBase.h

Include

#include "MeshRefinerBase.h"

Syntax

class FMeshRefinerBase

Remarks

This is a base class that implements common functionality for various triangle mesh resampling strategies (ie FRemesher and FReducer). You probably should not use this class directly.

Variables

Name Description

Protected variable

FDynamicMeshCha...

 

ActiveChangeTracker

Public variable

bool

 

AllowCollapseFixedVertsWithSameSetID

If true, then when two Fixed vertices have the same non-invalid SetID, we treat them as not fixed and allow collapse

Protected variable

TOptional< FMes...

 

Constraints

Constraints are used to control how certain edges and vertices can be modified

Public variable

int

 

DEBUG_CHECK_LEVEL

0 = no checking, 1 = check constraints each pass, 2 = and check validity each pass, 3 = and check validity after every mesh change (v slow but best for debugging)

Public variable

TArray< int >

 

DebugEdges

This is a debugging aid, will break to debugger if these edges are touched, in debug builds

Protected variable

double

 

EdgeFlipTolerance

If normals dot product is less than this, we consider it a normal flip. default = 0

Public variable

bool

 

ENABLE_PROFILING

Set to true to profile various passes

Protected variable

FDynamicMesh3 &...

 

Mesh

Mesh that will be refined

Public variable

FProgressCancel...

 

Progress

Set this to be able to cancel running Remesher/Reducer

Public variable

ETargetProjecti...

 

ProjectionMode

Method to use to project vertices onto target surface. Default is no projection.

Protected variable

IProjectionTarg...

 

ProjTarget

Vertices can be projected onto this surface when they are modified

Public variable

TFunction< EVer...

 

VertexControlF

This function allows client to specify fine-grained control over what happens to specific vertices.

Constructors

Destructors

Name Description

Public function Virtual

~FMeshRefinerBase()

Functions

Name Description

Public function Virtual

bool

 

Cancelled()

If this returns true, abort computation.

Protected function Const

bool

 

CanCollapseEdge

(
    int eid,
    int a,
    int b,
    int c,
    int d,
    int tc,
    int td,
    int& collapse_to
)

Figure out if we can collapse edge eid=[a,b] under current constraint set.

Protected function Const

bool

 

CanCollapseVertex

(
    int eid,
    int a,
    int b,
    int& collapse_to
)

Resolve vertex constraints for collapsing edge eid=[a,b].

Protected function Const

bool

 

CheckIfCollapseCreatesFlipOrInvalid

(
    int vid,
    int vother,
    const FVector3d& newv,
    int tc,
    int td
)

Check if edge collapse will create a face-normal flip.

Protected function Const

bool

 

CheckIfFlipInvertsNormals

(
    int a,
    int b,
    int c,
    int d,
    int t0
)

Check if edge flip might reverse normal direction.

Protected function Const

double

 

ComputeEdgeFlipMetric

(
    const FVector3d& Direction0,
    const FVector3d& Direction1
)

Protected function

void

 

DebugCheckUVSeamConstraints()

Protected function

void

 

DebugCheckVertexConstraints()

Protected function Virtual

void

 

DoDebugChecks

(
    bool bEndOfPass
)

Public function

const TOptio...

 

GetConstraints()

Get the current mesh constraints

Public function

double

 

GetEdgeFlipTolerance()

Public function

FDynamicMesh...

 

GetMesh()

Get the current mesh we are operating on

Protected function

bool

 

GetVertexConstraint

(
    int VertexID,
    FVertexConstraint& OutConstraint
)

Protected function

FVertexConst...

 

GetVertexConstraint

(
    int VertexID
)

Protected function

bool

 

IsVertexPositionConstrained

(
    int VertexID
)

Public function

IProjectionT...

 

ProjectionTarget()

Get the current Projection Target

Protected function

void

 

RuntimeDebugCheck

(
    int EdgeID
)

Testing/debug/profiling stuff

Protected function Virtual

void

 

SaveEdgeBeforeModify

(
    int32 EdgeID
)

Protected function Virtual

void

 

SaveTriangleBeforeModify

(
    int32 TriangleID
)

Protected function Virtual

void

 

SaveVertexTrianglesBeforeModify

(
    int32 VertexID
)

Public function

void

 

SetEdgeFlipTolerance

(
    double NewTolerance
)

Set edge flip tolerance. Value is clamped to range [-1,1]

Public function

void

 

SetExternalConstraints

(
    TOptional< FMeshConstraints > Const...
)

Set external constraints.

that this object will be updated during computation.

Public function

void

 

SetMeshChangeTracker

(
    FDynamicMeshChangeTracker* Tra...
)

Mesh Change Tracking support

Public function

void

 

SetProjectionTarget

(
    IProjectionTarget* TargetIn
)

Set a Projection Target

Operators

Name Description

Public function

FMeshRefiner...

 

operator=

(
    FMeshRefinerBase&&
)

Public function

FMeshRefiner...

 

operator=

(
    const FMeshRefinerBase&
)

Enums

Name

Description

Public enum

ETargetProjectionMode

Options for projecting vertices onto target surface

Public enum

EVertexControl

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