|
| std::unordered_set< std::string > | facehash |
| |
◆ FaceHash()
614 {
615 for (
Vec3i face : its.indices) {
616 std::swap(face(0), face(2));
618 }
619 }
Eigen::Matrix< int, 3, 1, Eigen::DontAlign > Vec3i
Definition Point.hpp:40
std::unordered_set< std::string > facehash
Definition Hollowing.cpp:561
static std::string facekey(const Vec3i &face, const std::vector< Vec3f > &vertices)
Definition Hollowing.cpp:594
std::vector< stl_vertex > vertices
Definition stl.h:165
std::vector< stl_triangle_vertex_indices > indices
Definition stl.h:164
References indexed_triangle_set::indices, and indexed_triangle_set::vertices.
◆ facekey()
| static std::string Slic3r::sla::FaceHash::facekey |
( |
const Vec3i & |
face, |
|
|
const std::vector< Vec3f > & |
vertices |
|
) |
| |
|
inlinestatic |
595 {
596
597 std::array<Vec<3, int64_t>, 3> pts = {
598 scaled<int64_t>(vertices[face(0)]),
599 scaled<int64_t>(vertices[face(1)]),
600 scaled<int64_t>(vertices[face(2)])
601 };
602
603
604
605
606 Vec<3, int64_t>
a = pts[0] - pts[2],
b = pts[1] - pts[2];
607 Vec<3, int64_t>
c =
a.cross(b) + (pts[0] + pts[1] + pts[2]) / 3;
608
609
611 }
static std::string hash(const Vec< 3, int64_t > &v)
Definition Hollowing.cpp:583
◆ find()
| bool Slic3r::sla::FaceHash::find |
( |
const std::string & |
key | ) |
|
|
inline |
◆ hash()
| static std::string Slic3r::sla::FaceHash::hash |
( |
const Vec< 3, int64_t > & |
v | ) |
|
|
inlinestatic |
584 {
585 std::string ret;
587
588 for (auto val : v)
590
591 return ret;
592 }
constexpr auto data(C &c) -> decltype(c.data())
Definition span.hpp:195
static constexpr size_t MAX_NUM_CHARS
Definition Hollowing.cpp:557
static std::array< char, MAX_NUM_CHARS+1 > to_chars(int64_t val)
Definition Hollowing.cpp:564
◆ to_chars()
565 {
566 std::array<char, MAX_NUM_CHARS + 1> ret;
567
568 static const constexpr char * Conv = "0123456789abcdef";
569
570 auto ptr = ret.begin();
571 auto uval =
static_cast<uint64_t>(std::abs(val));
572 while (uval) {
573 *ptr = Conv[uval & 0xf];
574 ++ptr;
575 uval = uval >> 4;
576 }
577 if (val < 0) { *ptr = '-'; ++ptr; }
578 *ptr = '\0';
579
580 return ret;
581 }
unsigned __int64 uint64_t
Definition unistd.h:80
◆ facehash
| std::unordered_set<std::string> Slic3r::sla::FaceHash::facehash |
◆ MAX_NUM_CHARS
| constexpr size_t Slic3r::sla::FaceHash::MAX_NUM_CHARS = 16 |
|
staticconstexpr |
The documentation for this struct was generated from the following file: