Navigation
API > API/Plugins > API/Plugins/MLDeformerFrameworkEditor > API/Plugins/MLDeformerFrameworkEditor/FMLDeformerEditorModel
Description
Calculate the normals for each vertex, given the triangle data and positions. It computes this by summing up the face normals for each vertex using that face, and normalizing them at the end.
| Name | CalcMeshNormals |
| Type | function |
| Header File | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Public/MLDeformerEditorModel.h |
| Include Path | #include "MLDeformerEditorModel.h" |
| Source | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Private/MLDeformerEditorModel.cpp |
void CalcMeshNormals
(
TArrayView < const FVector3f > VertexPositions,
TArrayView < const uint32 > IndexArray,
TArrayView < const int32 > VertexMap,
TArray < FVector3f > & OutNormals
) const
Parameters
| Name | Remarks |
|---|---|
| VertexPositions | The buffer with vertex positions. This is the size of the number of imported vertices. |
| IndexArray | The index buffer, which contains NumTriangles * 3 number of integers. |
| VertexMap | For each render vertex, an imported vertex number. For example, for a cube these indices go from 0..7. |
| OutNormals | The array that will contain the normals. This will automatically be resized internally by this method. |