![]() |
Prusa Slicer 2.6.0
|
Collection of static function to create normals. More...
#include <src/libslic3r/NormalUtils.hpp>
Public Types | |
| enum class | VertexNormalType { AverageNeighbor , AngleWeighted , NelsonMaxWeighted } |
| using | Normal = Vec3f |
| using | Normals = std::vector< Normal > |
Public Member Functions | |
| NormalUtils ()=delete | |
Static Public Member Functions | |
| static Normal | create_triangle_normal (const stl_triangle_vertex_indices &indices, const std::vector< stl_vertex > &vertices) |
| Create normal for triangle defined by indices from vertices. | |
| static Normals | create_triangle_normals (const indexed_triangle_set &its) |
| Create normals for each vertices. | |
| static Normals | create_normals (const indexed_triangle_set &its, VertexNormalType type=VertexNormalType::NelsonMaxWeighted) |
| Create normals for each vertex by averaging neighbor triangles normal. | |
| static Normals | create_normals_average_neighbor (const indexed_triangle_set &its) |
| static Normals | create_normals_angle_weighted (const indexed_triangle_set &its) |
| static Normals | create_normals_nelson_weighted (const indexed_triangle_set &its) |
| static float | indice_angle (int i, const Vec3crd &indice, const std::vector< stl_vertex > &vertices) |
| Calculate angle of trinagle side. | |
Collection of static function to create normals.
| using Slic3r::NormalUtils::Normal = Vec3f |
| using Slic3r::NormalUtils::Normals = std::vector<Normal> |
|
strong |
| Enumerator | |
|---|---|
| AverageNeighbor | |
| AngleWeighted | |
| NelsonMaxWeighted | |
|
delete |
|
static |
Create normals for each vertex by averaging neighbor triangles normal.
| its | Triangle indices and vertices |
| type | Type of calculation normals |
References AngleWeighted, AverageNeighbor, create_normals_angle_weighted(), create_normals_average_neighbor(), create_normals_nelson_weighted(), and NelsonMaxWeighted.
Referenced by Slic3r::its_short_edge_collpase().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References create_triangle_normal(), indice_angle(), indexed_triangle_set::indices, M_PI, Slic3r::normals(), and indexed_triangle_set::vertices.
Referenced by create_normals().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References create_triangle_normal(), indexed_triangle_set::indices, Slic3r::normals(), and indexed_triangle_set::vertices.
Referenced by create_normals().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References create_triangle_normal(), indexed_triangle_set::indices, Slic3r::normals(), and indexed_triangle_set::vertices.
Referenced by create_normals().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Create normal for triangle defined by indices from vertices.
| indices | index into vertices |
| vertices | vector of vertices |
References Slic3r::cross().
Referenced by create_normals_angle_weighted(), create_normals_average_neighbor(), create_normals_nelson_weighted(), and create_triangle_normals().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Create normals for each vertices.
| its | indices and vertices |
References create_triangle_normal(), indexed_triangle_set::indices, Slic3r::normals(), and indexed_triangle_set::vertices.
Here is the call graph for this function:
|
static |
Calculate angle of trinagle side.
| i | index to indices, define angle point |
| indice | address to vertices |
| vertices | vertices data |
References acos().
Referenced by create_normals_angle_weighted().
Here is the call graph for this function:
Here is the caller graph for this function: