Navigation
API > API/Runtime > API/Runtime/GeometryCore
FMeshNormals is a utility class that can calculate and store various types of normal vectors for a FDynamicMesh.
| Name | FMeshNormals |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/MeshNormals.h |
| Include Path | #include "DynamicMesh/MeshNormals.h" |
Syntax
class FMeshNormals
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMeshNormals
(
const FDynamicMesh3* Mesh |
DynamicMesh/MeshNormals.h | ||
FMeshNormals () |
DynamicMesh/MeshNormals.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ComputeTriangleNormals() |
Compute per-triangle normals | DynamicMesh/MeshNormals.h | |
void ComputeVertexNormals
(
bool bWeightByArea, |
Compute standard per-vertex normals by averaging one-ring face normals | DynamicMesh/MeshNormals.h | |
void CopyToOverlay
(
FDynamicMeshNormalOverlay* NormalOverlay, |
Copy the current set of normals to the NormalOverlay attribute layer | DynamicMesh/MeshNormals.h | |
void CopyToVertexNormals
(
FDynamicMesh3* SetMesh, |
Copy the current set of normals to the vertex normals of SetMesh | DynamicMesh/MeshNormals.h | |
const TArray< FVector3d > & GetNormals() |
DynamicMesh/MeshNormals.h | ||
void RecomputeOverlayNormals
(
const FDynamicMeshNormalOverlay* NormalOverlay, |
Recompute the per-element normals of the given overlay by averaging one-ring face normals | DynamicMesh/MeshNormals.h | |
void SetCount
(
int Count, |
Set the size of the Normals array to Count, and optionally clear all values to (0,0,0) | DynamicMesh/MeshNormals.h | |
| Assumes that ComputeTriangleNormals() has already been run. | DynamicMesh/MeshNormals.h | ||
void SetMesh
(
const FDynamicMesh3* MeshIn |
DynamicMesh/MeshNormals.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Compute_FaceAvg
(
bool bWeightByArea, |
Compute per-vertex normals using a custom combination of area-weighted and angle-weighted averaging of one-ring triangle normals | DynamicMesh/MeshNormals.h | |
void Compute_FaceAvg_AreaWeighted() |
Compute per-vertex normals using area-weighted averaging of one-ring triangle normals | DynamicMesh/MeshNormals.h | |
void Compute_Overlay_FaceAvg
(
const FDynamicMeshNormalOverlay* NormalOverlay, |
Recompute the element Normals of the given attribute overlay using a custom combination of area-weighted and angle-weighted averaging of one-ring triangle normals | DynamicMesh/MeshNormals.h | |
void Compute_Overlay_FaceAvg_AreaWeighted
(
const FDynamicMeshNormalOverlay* NormalOverlay |
Recompute the element Normals of the given attribute overlay using area-weighted averaging of one-ring triangle normals | DynamicMesh/MeshNormals.h | |
void Compute_Triangle() |
Compute per-triangle normals | DynamicMesh/MeshNormals.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FVector3d ComputeOverlayNormal
(
const FDynamicMesh3& Mesh, |
DynamicMesh/MeshNormals.h | ||
static FVector3d ComputeVertexNormal
(
const FDynamicMesh3& Mesh, |
Compute normal at mesh vertex by weighted sum of subset of one-ring triangle normals. | DynamicMesh/MeshNormals.h | |
static FVector3d ComputeVertexNormal
(
const FDynamicMesh3& Mesh, |
Compute normal at mesh vertex by weighted sum of one-ring triangle normals. | DynamicMesh/MeshNormals.h | |
static FVector3d GetVertexWeightsOnTriangle
(
const FDynamicMesh3* Mesh, |
Retrieve the area and/or angle weights for each vertex of a triangle | DynamicMesh/MeshNormals.h | |
static void InitializeMeshToPerTriangleNormals
(
FDynamicMesh3* Mesh |
Initialize the given Mesh with per-face normals, ie separate overlay element for each vertex of each triangle. | DynamicMesh/MeshNormals.h | |
static void InitializeOverlayRegionToPerVertexNormals
(
FDynamicMeshNormalOverlay* NormalOverlay, |
Initialize the given triangles of NormalOverlay with per-vertex normals, ie single overlay element for each mesh vertex. | DynamicMesh/MeshNormals.h | |
static void InitializeOverlayToPerTriangleNormals
(
FDynamicMeshNormalOverlay* NormalOverlay |
Initialize the given NormalOverlay with per-face normals, ie separate overlay element for each vertex of each triangle. | DynamicMesh/MeshNormals.h | |
static void InitializeOverlayToPerVertexNormals
(
FDynamicMeshNormalOverlay* NormalOverlay, |
Initialize the given NormalOverlay with per-vertex normals, ie single overlay element for each mesh vertex. | DynamicMesh/MeshNormals.h | |
static void InitializeOverlayTopologyFromFaceGroups
(
const FDynamicMesh3* Mesh, |
DynamicMesh/MeshNormals.h | ||
static void InitializeOverlayTopologyFromOpeningAngle
(
const FDynamicMesh3* Mesh, |
DynamicMesh/MeshNormals.h | ||
static void QuickComputeVertexNormals
(
FDynamicMesh3& Mesh, |
Compute per-vertex normals for the given Mesh | DynamicMesh/MeshNormals.h | |
static void QuickComputeVertexNormalsForTriangles
(
FDynamicMesh3& Mesh, |
Compute per-vertex normals for the vertices of a set of triangles of a Mesh | DynamicMesh/MeshNormals.h | |
static bool QuickRecomputeOverlayNormals
(
FDynamicMesh3& Mesh, |
Compute overlay normals for the given mesh | DynamicMesh/MeshNormals.h | |
static bool RecomputeOverlayElementNormals
(
FDynamicMesh3& Mesh, |
Compute overlay normals for the given mesh, for the given set of element IDs | DynamicMesh/MeshNormals.h | |
static bool RecomputeOverlayTriNormals
(
FDynamicMesh3& Mesh, |
Compute overlay normals for the given mesh, for the given set of triangles | DynamicMesh/MeshNormals.h | |
static void SmoothVertexNormals
(
FDynamicMesh3& Mesh, |
Apply rounds of explicit uniform-weighted normal smoothing to the VertexNormals attribute of the given Mesh. | DynamicMesh/MeshNormals.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector3d & operator[]
(
int i |
DynamicMesh/MeshNormals.h | ||
const FVector3d & operator[]
(
int i |
DynamicMesh/MeshNormals.h |