FProfileSweepGenerator

Much like [FGeneralizedCylinderGenerator](API\Plugins\GeometricObjects\Generators\FGeneralizedCylinderGenerator), but allows an arbitrary profile curve to be swept, and gives control over the frames of the sweep curve.

Windows
MacOS
Linux

Inheritance Hierarchy

FMeshShapeGenerator

FProfileSweepGenerator

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Generators/SweepGenerator.h

Include

#include "Generators/SweepGenerator.h"

Syntax

class FProfileSweepGenerator : public FMeshShapeGenerator

Remarks

Much like FGeneralizedCylinderGenerator, but allows an arbitrary profile curve to be swept, and gives control over the frames of the sweep curve. A mesh will be properly oriented if the profile curve is oriented counterclockwise when facing down the direction in which it is being swept.

Because it supports open profile curves, as well as welded points (for welding points on an axis of rotation), it cannot actually use the utility function from FSweepGeneratorBase, and so it doesn't inherit from that class.

Variables

Name Description

Public variable

bool

 

bProfileCurveIsClosed

If true, the last point of the profile curve is considered to be connected to the first.

Public variable

bool

 

bSharpNormals

If true, each triangle will have its own normals at each vertex, rather than sharing averaged ones with nearby triangles.

Public variable

bool

 

bSweepCurveIsClosed

If true, the last point of the sweep curve is considered to be connected to the first.

Public variable

bool

 

bUVScaleRelativeWorld

When true, the generator attempts to scale UV's in a way that preserves scaling across different mesh results, aiming for 1.0 in UV space to be equal to UnitUVInWorldCoordinates in world space.

Public variable

bool

 

bUVsSkipFullyWeldedEdges

If true, welded-to-welded connections in the profile curve (which can't result in triangles) do not affect the UV layout.

Public variable

double

 

DiagonalTolerance

When QuadSplitMode is ShortestDiagonal, biases one of the diagonals so that symmetric quads are split uniformly.

Public variable

TArray< int32 >...

 

EndProfiles

If the sweep curve is not closed, this will store the vertex ids of the first and last instances of the profile curve.

Public variable

EProfileSweepPo...

 

PolygonGroupingMode

Public variable

TArray< FVector...

 

ProfileCurve

Curve that will be swept along the curve, given in coordinates of the frames used in the sweep curve.

Public variable

FProgressCancel...

 

Progress

If not null, this pointer is intermittently used to check whether the current operation should stop early.

Public variable

EProfileSweepQu...

 

QuadSplitMethod

Public variable

TArray< FFrame3...

 

SweepCurve

Curve along which to sweep the profile curve.

Public variable

float

 

UnitUVInWorldCoordinates

Only relevant if bUVScaleRelativeWorld is true (see that description)

Public variable

FVector2d

 

UVOffset

These values will be added to the generated UV coordinates after applying UVScale.

Public variable

FVector2d

 

UVScale

Generated UV coordinates will be multiplied by these values.

Public variable

TSet< int32 >

 

WeldedVertices

Indices into ProfileCurve that should not be swept along the curve, instead being instantiated just once.

Functions

Name Description

Protected function

void

 

AdjustNormalsForTriangle

(
    int32 TriIndex,
    int32 FirstIndex,
    int32 SecondIndex,
    int32 ThirdIndex,
    TArray< FVector3d >& WeightedNorma...
)

Utility function for calculating the triangle normal contributions to average normals.

Protected function

void

 

AdjustNormalsForTriangle

(
    int32 TriIndex,
    int32 FirstIndex,
    int32 SecondIndex,
    int32 ThirdIndex,
    TArray< FVector3d >& WeightedNorma...,
    const FVector3d& AbNormalized
)

Utility function for calculating the contribution of triangle normals to average normals.

Protected function

void

 

InitializeUvBuffer

(
    const TArray< int32 >& VertPositio...,
    int32& NumUvRowsOut,
    int32& NumUvColumnsOut
)

TODO: We could output other boundaries too, but that's probably only worth doing once we find a case where we would actually use them.

Overridden from FMeshShapeGenerator

Name Description

Public function Virtual

FMeshShapeGe...

 

Generate()

TODO: We could allow the user to dissallow bowtie vertex creation, which currently could happen depending on which vertices are welded.

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