Collection of static function to create normals. More...
#include </home/runner/work/OrcaSlicer/OrcaSlicer/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 Vec3i32 &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 |
|
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().
|
static |
References count, create_triangle_normal(), indice_angle(), M_PI, and Slic3r::normal().
Referenced by create_normals().
|
static |
References count, create_triangle_normal(), and Slic3r::normal().
Referenced by create_normals().
|
static |
References count, create_triangle_normal(), and Slic3r::normal().
Referenced by create_normals().
|
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().
|
static |
Create normals for each vertices.
| its | indices and vertices |
References create_triangle_normal().
|
static |
Calculate angle of trinagle side.
| i | index to indices, define angle point |
| indice | address to vertices |
| vertices | vertices data |
Referenced by create_normals_angle_weighted().