Utility methods for processing meshes used in outline rendering.
More...
|
| static NativeArray< Vector3 > | ComputeSmoothNormals (Mesh mesh) |
| | Computes smooth normals for a mesh by averaging normals of vertices at the same position.
|
| |
| static void | CombineSubMeshes (Mesh mesh) |
| | Combines all submeshes of a mesh into a single submesh appended at the end.
|
| |
Utility methods for processing meshes used in outline rendering.
◆ CombineSubMeshes()
| static void CombineSubMeshes |
( |
Mesh | mesh | ) |
|
|
inlinestatic |
Combines all submeshes of a mesh into a single submesh appended at the end.
- Parameters
-
| mesh | The mesh to process. Must have Read/Write enabled. |
The original submeshes are preserved, with the combined submesh added as a new one. If the mesh already has only one submesh, this operation is skipped.
◆ ComputeSmoothNormals()
| static NativeArray< Vector3 > ComputeSmoothNormals |
( |
Mesh | mesh | ) |
|
|
inlinestatic |
Computes smooth normals for a mesh by averaging normals of vertices at the same position.
- Parameters
-
| mesh | The mesh to compute smooth normals for. Must have Read/Write enabled. |
- Returns
- A NativeArray containing smoothed normals corresponding to each vertex. The caller is responsible for disposal.
This method is optimized for performance using native collections:
- First pass accumulates normals by vertex position
- Second pass normalizes the accumulated normals Temporary allocations are cleaned up automatically via Allocator.Temp
The documentation for this class was generated from the following file:
- Runtime/Outline/Utilities/OutlineUtils.cs