Speed up QEC by move error directly into MutablePriorityQueue
Memory optimization: Change size_t to 32bit int Lightweight Error structure for faster PriorityQueue
This commit is contained in:
parent
35a906139e
commit
c00dca7810
2 changed files with 179 additions and 176 deletions
|
@ -2,6 +2,7 @@
|
|||
// sum up: https://users.csc.calpoly.edu/~zwood/teaching/csc570/final06/jseeba/
|
||||
// inspiration: https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification
|
||||
|
||||
#include <cstdint>
|
||||
#include "TriangleMesh.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -10,8 +11,13 @@ namespace Slic3r {
|
|||
/// Simplify mesh by Quadric metric
|
||||
/// </summary>
|
||||
/// <param name="its">IN/OUT triangle mesh to be simplified.</param>
|
||||
/// <param name="triangle_count">wanted triangle count.</param>
|
||||
/// <returns>TRUE on success otherwise FALSE</returns>
|
||||
bool its_quadric_edge_collapse(indexed_triangle_set &its, size_t triangle_count);
|
||||
/// <param name="triangle_count">Wanted triangle count.</param>
|
||||
/// <param name="max_error">Maximal Quadric for reduce.
|
||||
/// When nullptr then max float is used
|
||||
/// Output: Last used ErrorValue to collapse edge
|
||||
/// </param>
|
||||
void its_quadric_edge_collapse(indexed_triangle_set &its,
|
||||
uint32_t triangle_count = 0,
|
||||
float * max_error = nullptr);
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue