Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Operations
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/MeshBevel.h |
| Include | #include "Operations/MeshBevel.h" |
Syntax
class FMeshBevel
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FBevelEdge > | Edges | ||
| double | InsetDistance | Inputs Distance that bevel edges/vertices are inset from their initial position. | |
| TArray< FBevelLoop > | Loops | ||
| EMaterialIDMode | MaterialIDMode | Which MaterialID assignment mode to use | |
| TMap< int32, int32 > | MeshEdgePairs | ||
| TArray< int32 > | NewTriangles | Outputs list of all new triangles created by the operation | |
| int32 | NumSubdivisions | Number of subdivisions inserted in each bevel strip | |
| FProgressCancel * | Progress | Set this member to support progress/cancel in the computations below | |
| FGeometryResult | ResultInfo | Status of the operation, warnings/errors may be returned here | |
| double | RoundWeight | "Roundness" of the bevel profile. | |
| int32 | SetConstantMaterialID | Constant MaterialID used for various MaterialIDMode settings | |
| TMap< int32, int32 > | VertexIDToIndexMap | ||
| TArray< FBevelVertex > | Vertices |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddBevelEdgeLoop
(
const FDynamicMesh3& Mesh, |
||
| 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 | |
| void | AppendEdgeQuads
(
FDynamicMesh3& Mesh, |
||
| void | AppendEdgeQuads_Multi
(
FDynamicMesh3& Mesh, |
||
| void | AppendJunctionVertexPolygon
(
FDynamicMesh3& Mesh, |
||
| void | AppendJunctionVertexPolygon_Multi
(
FDynamicMesh3& Mesh, |
||
| void | AppendLoopQuads
(
FDynamicMesh3& Mesh, |
||
| void | AppendLoopQuads_Multi
(
FDynamicMesh3& Mesh, |
||
| void | AppendTerminatorVertexPairQuad
(
FDynamicMesh3& Mesh, |
||
| void | AppendTerminatorVertexPairQuad_Multi
(
FDynamicMesh3& Mesh, |
||
| void | AppendTerminatorVertexTriangle
(
FDynamicMesh3& Mesh, |
||
| void | AppendTerminatorVertexTriangles_Multi
(
FDynamicMesh3& Mesh, |
||
| bool | Apply
(
FDynamicMesh3& Mesh, |
Apply the bevel operation to the mesh, and optionally track changes | |
| void | ApplyProfileShape_Round
(
FDynamicMesh3& Mesh |
||
| void | BuildJunctionVertex
(
FBevelVertex& Vertex, |
||
| void | BuildTerminatorVertex
(
FBevelVertex& Vertex, |
||
| void | BuildVertexSets
(
const FDynamicMesh3& Mesh |
||
| void | ComputeMaterialIDs
(
FDynamicMesh3& Mesh |
||
| void | ComputeNormals
(
FDynamicMesh3& Mesh |
||
| void | ComputeUVs
(
FDynamicMesh3& Mesh |
||
| 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 | |
| void | CreateBevelMeshing_Multi
(
FDynamicMesh3& Mesh |
Meshing functions for multi-segment bevel with optional round profile | |
| void | DisplaceVertices
(
FDynamicMesh3& Mesh, |
||
| void | FixUpUnlinkedBevelEdges
(
FDynamicMesh3& Mesh |
||
| FBevelVertex * | GetBevelVertexFromVertexID
(
int32 VertexID, |
||
| void | InitializeFromGroupTopology
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with all edges of the given GroupTopology | |
| void | InitializeFromGroupTopologyEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified edges of a GroupTopology | |
| bool | InitializeFromGroupTopologyFaces
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified faces of a GroupTopology | |
| void | InitializeFromTriangleEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified mesh triangle edges | |
| void | InitializeFromTriangleEdges
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with the specified mesh triangle edges | |
| bool | InitializeFromTriangleSet
(
const FDynamicMesh3& Mesh, |
Initialize the bevel with border loops of the selected triangles. | |
| FInterpCurveVector | MakeArcSplineCurve
(
const FVector3d& PosA, |
||
| void | UnlinkBevelEdgeInterior
(
FDynamicMesh3& Mesh, |
||
| void | UnlinkBevelLoop
(
FDynamicMesh3& Mesh, |
||
| void | UnlinkEdges
(
FDynamicMesh3& Mesh, |
Unlink phase - disconnect triangles along bevel edges/loops, and at vertices. | |
| void | UnlinkJunctionVertex
(
FDynamicMesh3& Mesh, |
||
| void | UnlinkLoops
(
FDynamicMesh3& Mesh, |
||
| void | UnlinkTerminatorVertex
(
FDynamicMesh3& Mesh, |
||
| void | UnlinkVertices
(
FDynamicMesh3& Mesh, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| 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
| Type | Name | Description | |
|---|---|---|---|
| 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 |