Navigation
API > API/Plugins > API/Plugins/DynamicMesh
FMeshBevel applies a "Bevel" operation to edges of a FDynamicMesh3. Bevel is not strictly well-defined, there are a wide range of possible cases to handle and currently only some are supported. See this website for a discussion of many interesting cases (most are not currently supported): https://wiki.blender.org/wiki/User:Howardt/Bevel
The bevel operation is applied in-place to the input mesh. The bevel is mesh-topological, ie implemented by un-stitching mesh edges and inserting new triangles, rather than via booleans/etc.
Currently supports:
- Bevel an isolated closed loop of edges, that edge-loop becomes a quad-strip (simplest case)
- Bevel a set of open edge spans that may meet a T-junctions
- if incoming-span-valence at a vertex is >= 3, vertex is replaced by a polygon
- if incoming-span-valence at a vertex is 1, bevel is "terminated" by expanding the vertex into an edge (this is the messiest case)
- vertex-on-boundary is a special case that is simpler
- edge spans are replaced by quad-strips
Currently does not support:
- Beveling an isolated vertex
- partial bevels of a GroupTopology Edge
- multiple-segment bevel (eg to do rounds/etc)
- ???
Generally this FMeshBevel is intended to be applied to group-boundary "edges" in a FGroupTopology. However the FGroupTopology is currently only used in the initial setup, so other methods could be used to construct the bevel topology.
Currently "updating" the bevel shape, once the topology is known, is not supported, but could be implemented relatively easily, as all the relevant information is already tracked and stored.
| Name | FMeshBevel |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/MeshBevel.h |
| Include Path | #include "Operations/MeshBevel.h" |
Syntax
class FMeshBevel
Structs
| Name | Remarks |
|---|---|
| FBevelEdge | FBevelEdge is the accumulated data for an open span of mesh-edges, which possibly meets up with other bevel-edges at the vertices on either end of the span. |
| FBevelLoop | Current Bevel computation strategy is basically to fully precompute all the necessary info for the entire bevel, then "unlink" all the edges and vertices, and then stitch it all back together. |
| FBevelVertex | A FBevelVertex repesents/stores the accumulated data at a "bevel vertex", which is the mesh vertex at the end of a FBevelEdge. |
| FBevelVertex_InteriorVertex | |
| FOneRingWedge | A FOneRingWedge represents a sequential set of connected triangles around a vertex, ie a subset of an ordered triangle one-ring. |
Enums
Public
| Name | Remarks |
|---|---|
| EBevelVertexType | A FBevelVertex can have various types, depending on the topology of the bevel edge graph and input mesh |
| EMaterialIDMode | Options for MaterialID assignment on the new triangles generated for the bevel |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| InsetDistance | double | Inputs Distance that bevel edges/vertices are inset from their initial position. | Operations/MeshBevel.h | |
| MaterialIDMode | EMaterialIDMode | Which MaterialID assignment mode to use | Operations/MeshBevel.h | |
| NewTriangles | TArray< int32 > | Outputs list of all new triangles created by the operation | Operations/MeshBevel.h | |
| NumSubdivisions | int32 | Number of subdivisions inserted in each bevel strip | Operations/MeshBevel.h | |
| Progress | FProgressCancel * | Set this member to support progress/cancel in the computations below | Operations/MeshBevel.h | |
| ResultInfo | FGeometryResult | Status of the operation, warnings/errors may be returned here | Operations/MeshBevel.h | |
| RoundWeight | double | "Roundness" of the bevel profile. | Operations/MeshBevel.h | |
| SetConstantMaterialID | int32 | Constant MaterialID used for various MaterialIDMode settings | Operations/MeshBevel.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Apply
(
FDynamicMesh3& Mesh, |
Apply the bevel operation to the mesh, and optionally track changes | Operations/MeshBevel.h | |
void InitializeFromGroupTopology
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with all edges of the given GroupTopology | Operations/MeshBevel.h | |
void InitializeFromGroupTopologyEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified edges of a GroupTopology | Operations/MeshBevel.h | |
bool InitializeFromGroupTopologyFaces
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified faces of a GroupTopology | Operations/MeshBevel.h | |
void InitializeFromTriangleEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified mesh triangle edges | Operations/MeshBevel.h | |
void InitializeFromTriangleEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified mesh triangle edges | Operations/MeshBevel.h | |
bool InitializeFromTriangleSet
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with border loops of the selected triangles. | Operations/MeshBevel.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddBevelEdgeLoop
(
const FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AddBevelGroupEdge
(
const FDynamicMesh3& Mesh, |
Setup phase: register Edges (spans) and (isolated) Loops that need to be beveled and precompute/store any mesh topology that must be tracked across the operation Required BevelVertex's are added by AddBevelGroupEdge() Once edges are configured, BuildVertexSets() is called to precompute the vertex topological information | Operations/MeshBevel.h | |
void AppendEdgeQuads
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendEdgeQuads_Multi
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendJunctionVertexPolygon
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendJunctionVertexPolygon_Multi
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendLoopQuads
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendLoopQuads_Multi
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendTerminatorVertexPairQuad
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendTerminatorVertexPairQuad_Multi
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendTerminatorVertexTriangle
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void AppendTerminatorVertexTriangles_Multi
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void ApplyProfileShape_Round
(
FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
void BuildJunctionVertex
(
FBevelVertex& Vertex, |
Operations/MeshBevel.h | ||
void BuildTerminatorVertex
(
FBevelVertex& Vertex, |
Operations/MeshBevel.h | ||
void BuildVertexSets
(
const FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
void ComputeMaterialIDs
(
FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
void ComputeNormals
(
FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
void ComputeUVs
(
FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
void CreateBevelMeshing
(
FDynamicMesh3& Mesh |
Meshing phase - append quad-strips between unlinked edge spans/loops, polygons at junction vertices where required, and triangles at terminator vertices Meshing functions for chamfer bevel, ie no subdivisions | Operations/MeshBevel.h | |
void CreateBevelMeshing_Multi
(
FDynamicMesh3& Mesh |
Meshing functions for multi-segment bevel with optional round profile | Operations/MeshBevel.h | |
void DisplaceVertices
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void FixUpUnlinkedBevelEdges
(
FDynamicMesh3& Mesh |
Operations/MeshBevel.h | ||
FBevelVertex * GetBevelVertexFromVertexID
(
int32 VertexID, |
Operations/MeshBevel.h | ||
FInterpCurveVector MakeArcSplineCurve
(
const FVector3d& PosA, |
Operations/MeshBevel.h | ||
void UnlinkBevelEdgeInterior
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void UnlinkBevelLoop
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void UnlinkEdges
(
FDynamicMesh3& Mesh, |
Unlink phase - disconnect triangles along bevel edges/loops, and at vertices. | Operations/MeshBevel.h | |
void UnlinkJunctionVertex
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void UnlinkLoops
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void UnlinkTerminatorVertex
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h | ||
void UnlinkVertices
(
FDynamicMesh3& Mesh, |
Operations/MeshBevel.h |