Navigation
API > API/Runtime > API/Runtime/GeometryCore
Sweep a 2D Profile Polygon along a 3D Path.
TODO:
- a custom variant for toruses specifically (would be faster)
| Name | FGeneralizedCylinderGenerator |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Generators/SweepGenerator.h |
| Include Path | #include "Generators/SweepGenerator.h" |
Syntax
class FGeneralizedCylinderGenerator : public UE::Geometry::FSweepGeneratorBase
Inheritance Hierarchy
- FMeshShapeGenerator → FSweepGeneratorBase → FGeneralizedCylinderGenerator
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAlignFramesToSampledTangents | bool | Whether to align the frames to the path tangents. Only relevant if PathFrames is specified. | Generators/SweepGenerator.h | |
| bCapped | bool | Generators/SweepGenerator.h | ||
| bLoop | bool | Generators/SweepGenerator.h | ||
| bUVScaleRelativeWorld | bool | 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. | Generators/SweepGenerator.h | |
| CapType | ECapType | Generators/SweepGenerator.h | ||
| CrossSection | FPolygon2d | Generators/SweepGenerator.h | ||
| CrossSectionTexCoord | TArray< float > | -If FSweepGeneratorBase::bProfileCurveIsClosed == true and CrossSectionTexCoord.Num() >= CrossSection.VertexCount() + 1 then the first CrossSection.VertexCount() + 1 values will be used as U coordinates. | Generators/SweepGenerator.h | |
| EndScale | double | Generators/SweepGenerator.h | ||
| InitialFrame | FFrame3d | Generators/SweepGenerator.h | ||
| MiterLimit | double | Maximum factor by which mitering can expand the cross section at sharp turns, to give the appearance of a consistent cross section width. | Generators/SweepGenerator.h | |
| Path | TArray< FVector3d > | Generators/SweepGenerator.h | ||
| PathFrames | TArray< FFrame3d > | If PathFrames.Num == Path.Num, then PathFrames[k] is used for each step instead of the propagated InitialFrame. | Generators/SweepGenerator.h | |
| PathScales | TArray< FVector2d > | If PathScales.Num == Path.Num, then PathScales[k] is applied to the CrossSection at each step (this is combined with StartScale/EndScale, but ignored if bLoop=true) | Generators/SweepGenerator.h | |
| PathTexCoord | TArray< float > | -If bLoop == true and PathTexCoord.Num() >= Path.Num() + 1 then the first Path.Num() + 1 values will be used as V coordinates. | Generators/SweepGenerator.h | |
| StartScale | double | 2D uniform scale of the CrossSection, interpolated along the Path (via arc length) from StartScale to EndScale | Generators/SweepGenerator.h | |
| UnitUVInWorldCoordinates | float | Only relevant if bUVScaleRelativeWorld is true (see that description) | Generators/SweepGenerator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void EnableMitering
(
double InMiterLimit |
Configure settings to support mitering i.e., scaling the cross sections as needed to maintain consistent cross section size through sharp corners, up to the specified scale limit. | Generators/SweepGenerator.h | |
void SetMiterLimitByAngle
(
double MiterAngleLimitInDeg |
Set the MiterLimit based on the maximum turn angle at which a correct miter should be applied. | Generators/SweepGenerator.h |
Overridden from FMeshShapeGenerator
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FMeshShapeGenerator & Generate() |
Generate the mesh | Generators/SweepGenerator.h |