Navigation
API > API/Plugins > API/Plugins/DynamicMesh
FOffsetMeshRegion implements local extrusion/offset of a mesh region. The selected triangles are separated and then stitched back together, creating an new strip of triangles around their border (s). The offset region is then transformed using the OffsetPositionFunc.
Complex input regions are handled, eg it can be multiple disconnected components, donut-shaped, etc
Each quad of the border loop is assigned it's own normal and UVs (ie each is a separate UV-island)
| Name | FOffsetMeshRegion |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/OffsetMeshRegion.h |
| Include Path | #include "Operations/OffsetMeshRegion.h" |
Syntax
class FOffsetMeshRegion : public UE::Geometry::FOffsetMeshRegionFixLayout
Inheritance Hierarchy
- FOffsetMeshRegionFixLayout → FOffsetMeshRegion
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOffsetMeshRegion
(
FDynamicMesh3* mesh |
Operations/OffsetMeshRegion.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FOffsetMeshRegion() |
Operations/OffsetMeshRegion.h |
Structs
| Name | Remarks |
|---|---|
| FOffsetInfo | Outputs Offset information for a single connected component |
Enums
Public
| Name | Remarks |
|---|---|
| EVersion | Support for different versions of the OffsetMeshRegion geometric operation. |
| EVertexExtrusionVectorType | Method used to determine the per-vertex offset direction vector |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllModifiedAndNewTriangles | TArray< int32 > | List of all triangles created/modified by this operation | Operations/OffsetMeshRegion.h | |
| bGroupPerSubdivision | bool | If true, each subdivision level gets a new group This parameter is only supported in EVersion::Version1 and later | Operations/OffsetMeshRegion.h | |
| bInferMaterialID | bool | If true, Material IDs around the border of the extrude area are propagated "down" the extrusion tube This parameter is only supported in EVersion::Version1 and later | Operations/OffsetMeshRegion.h | |
| bIsPositiveOffset | bool | When bOffsetFullComponentsAsSolids is true and the extrusion applied by OffsetPositionFunc is negative, then fully-connected components need to be turned inside-out. | Operations/OffsetMeshRegion.h | |
| bOffsetFullComponentsAsSolids | bool | If a sub-region of Triangles is a full connected component, offset into a solid instead of leaving a shell | Operations/OffsetMeshRegion.h | |
| bSingleGroupPerArea | bool | If true, each extruded area gets a single new group, instead of remapping the input groups This parameter is only supported in EVersion::Version1 and later | Operations/OffsetMeshRegion.h | |
| bUVIslandPerGroup | bool | If true, new UV island is assigned for each group in stitch region. | Operations/OffsetMeshRegion.h | |
| CreaseAngleThresholdDeg | double | Split the extrude "tube" into separate groups based on the opening angle between quads. | Operations/OffsetMeshRegion.h | |
| DefaultOffsetDistance | double | Used in the default OffsetPositionFunc. | Operations/OffsetMeshRegion.h | |
| ExtrusionVectorType | EVertexExtrusionVectorType | Determines the type of vector passed in per-vertex to OffsetPositionFunc | Operations/OffsetMeshRegion.h | |
| LoopEdgesShouldHaveSameGroup | TFunction< bool(int32 Eid1, int32 Eid2)> | When stitching the extruded portion to the source loop, this determines the grouping of the side quads by passing in successive Eids in the original loop. | Operations/OffsetMeshRegion.h | |
| MaxScaleForAdjustingTriNormalsOffset | double | When using SelectionTriNormalsAngleWeightedAdjusted to keep triangles parallel, clamp the offset scale to at most this factor | Operations/OffsetMeshRegion.h | |
| Mesh | FDynamicMesh3 * | Inputs The mesh that we are modifying | Operations/OffsetMeshRegion.h | |
| NumSubdivisions | int32 | Number of subdivisions along the length of the "tubes" used to stitch the offset regions. | Operations/OffsetMeshRegion.h | |
| OffsetPositionFunc | TFunction< FVector3d(const FVector3d &Position, const FVector3d &VertexVector, int Vid)> | OffsetPositionFunc function is called to generate the offset vertex position. | Operations/OffsetMeshRegion.h | |
| OffsetRegions | TArray< FOffsetInfo > | List of offset regions/components | Operations/OffsetMeshRegion.h | |
| SetMaterialID | int | Constant Material ID to set along the extrusion tubes This parameter is only supported in EVersion::Version1 and later | Operations/OffsetMeshRegion.h | |
| Triangles | TArray< int32 > | The triangle region we are modifying | Operations/OffsetMeshRegion.h | |
| UseVersion | EVersion | Version of Offset operation being used. Defaults to Current, ie most recent version | Operations/OffsetMeshRegion.h | |
| UVScaleFactor | float | Quads on the stitch loop are planar-projected and scaled by this amount | Operations/OffsetMeshRegion.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Apply() |
Apply the Offset operation to the input mesh. | Operations/OffsetMeshRegion.h | |
virtual EOperationValidationResult Validate() |
Operations/OffsetMeshRegion.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ApplyOffset
(
FOffsetInfo& Region |
Operations/OffsetMeshRegion.h | ||
virtual bool ApplyOffset_Legacy
(
FOffsetInfo& Region |
Operations/OffsetMeshRegion.h | ||
virtual bool ApplyOffset_Version1
(
FOffsetInfo& Region |
Operations/OffsetMeshRegion.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool EdgesSeparateSameGroupsAndAreColinearAtBorder
(
FDynamicMesh3* Mesh, |
The default function used for LoopEdgesShouldHaveSameGroup. | Operations/OffsetMeshRegion.h |