#include <src/libslic3r/TriangleSelector.hpp>
|
| | Sphere ()=delete |
| |
| | Sphere (const Vec3f ¢er_, const Vec3f &source_, float radius_world, const Transform3d &trafo_, const ClippingPlane &clipping_plane_) |
| |
| | ~Sphere () override=default |
| |
| bool | is_mesh_point_inside (const Vec3f &point) const override |
| |
| bool | is_edge_inside_cursor (const Triangle &tr, const std::vector< Vertex > &vertices) const override |
| |
| bool | is_facet_visible (int facet_idx, const std::vector< Vec3f > &face_normals) const override |
| |
| bool | is_pointer_in_triangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) const override |
| |
| bool | is_pointer_in_triangle (const Triangle &tr, const std::vector< Vertex > &vertices) const |
| |
| virtual int | vertices_inside (const Triangle &tr, const std::vector< Vertex > &vertices) const |
| |
◆ Sphere() [1/2]
| Slic3r::TriangleSelector::Sphere::Sphere |
( |
| ) |
|
|
delete |
◆ Sphere() [2/2]
SinglePointCursor()=delete
◆ ~Sphere()
| Slic3r::TriangleSelector::Sphere::~Sphere |
( |
| ) |
|
|
overridedefault |
◆ cursor_factory()
85 {
88 return std::make_unique<TriangleSelector::Sphere>(
center, camera_pos, cursor_radius, trafo_matrix,
clipping_plane);
89 else
90 return std::make_unique<TriangleSelector::Circle>(
center, camera_pos, cursor_radius, trafo_matrix,
clipping_plane);
91 }
ClippingPlane clipping_plane
Definition TriangleSelector.hpp:71
Vec3f center
Definition TriangleSelector.hpp:96
@ SPHERE
Definition TriangleSelector.hpp:27
@ CIRCLE
Definition TriangleSelector.hpp:26
References Slic3r::TriangleSelector::SinglePointCursor::center, Slic3r::TriangleSelector::CIRCLE, Slic3r::TriangleSelector::Cursor::clipping_plane, and Slic3r::TriangleSelector::SPHERE.
Referenced by Slic3r::GUI::GLGizmoPainterBase::gizmo_event().
◆ is_edge_inside_cursor()
| bool Slic3r::TriangleSelector::Sphere::is_edge_inside_cursor |
( |
const Triangle & |
tr, |
|
|
const std::vector< Vertex > & |
vertices |
|
) |
| const |
|
overridevirtual |
Implements Slic3r::TriangleSelector::Cursor.
1010{
1011 std::array<Vec3f, 3> pts;
1012 for (int i = 0; i < 3; ++i) {
1013 pts[i] = vertices[tr.verts_idxs[i]].v;
1015 pts[i] = this->
trafo * pts[i];
1016 }
1017
1018 for (int side = 0; side < 3; ++side) {
1019 const Vec3f &edge_a = pts[side];
1020 const Vec3f &edge_b = pts[side < 2 ? side + 1 : 0];
1022 return true;
1023 }
1024 return false;
1025}
Transform3f trafo
Definition TriangleSelector.hpp:62
bool uniform_scaling
Definition TriangleSelector.hpp:65
float radius
Definition TriangleSelector.hpp:67
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:49
static bool test_line_inside_sphere(const Vec3f &line_a, const Vec3f &line_b, const Vec3f &sphere_p, const float sphere_radius)
Definition TriangleSelector.cpp:14
References Slic3r::test_line_inside_sphere(), and Slic3r::TriangleSelector::Triangle::verts_idxs.
◆ is_facet_visible() [1/2]
| bool Slic3r::TriangleSelector::Cursor::is_facet_visible |
( |
const Cursor & |
cursor, |
|
|
int |
facet_idx, |
|
|
const std::vector< Vec3f > & |
face_normals |
|
) |
| |
|
staticinherited |
◆ is_facet_visible() [2/2]
| bool Slic3r::TriangleSelector::Sphere::is_facet_visible |
( |
int |
facet_idx, |
|
|
const std::vector< Vec3f > & |
face_normals |
|
) |
| const |
|
inlineoverridevirtual |
◆ is_mesh_point_inside()
| bool Slic3r::TriangleSelector::Sphere::is_mesh_point_inside |
( |
const Vec3f & |
point | ) |
const |
|
overridevirtual |
◆ is_pointer_in_triangle() [1/2]
| bool Slic3r::TriangleSelector::Cursor::is_pointer_in_triangle |
( |
const Triangle & |
tr, |
|
|
const std::vector< Vertex > & |
vertices |
|
) |
| const |
|
inherited |
980 {
981 const Vec3f& p1 = vertices[tr.verts_idxs[0]].v;
982 const Vec3f& p2 = vertices[tr.verts_idxs[1]].v;
983 const Vec3f& p3 = vertices[tr.verts_idxs[2]].v;
985}
bool is_pointer_in_triangle(const Triangle &tr, const std::vector< Vertex > &vertices) const
Definition TriangleSelector.cpp:980
References Slic3r::TriangleSelector::Triangle::verts_idxs.
◆ is_pointer_in_triangle() [2/2]
Implements Slic3r::TriangleSelector::Cursor.
1924{
1926}
Vec3f dir
Definition TriangleSelector.hpp:69
static bool is_circle_pointer_inside_triangle(const Vec3f &p1_, const Vec3f &p2_, const Vec3f &p3_, const Vec3f ¢er, const Vec3f &dir, const bool uniform_scaling, const Transform3f &trafo)
Definition TriangleSelector.cpp:1901
References Slic3r::is_circle_pointer_inside_triangle().
◆ vertices_inside()
| int Slic3r::TriangleSelector::Cursor::vertices_inside |
( |
const Triangle & |
tr, |
|
|
const std::vector< Vertex > & |
vertices |
|
) |
| const |
|
virtualinherited |
◆ center
| Vec3f Slic3r::TriangleSelector::SinglePointCursor::center |
|
protectedinherited |
◆ clipping_plane
◆ dir
| Vec3f Slic3r::TriangleSelector::Cursor::dir = Vec3f(0.f, 0.f, 0.f) |
|
protectedinherited |
◆ radius
| float Slic3r::TriangleSelector::Cursor::radius |
|
protectedinherited |
◆ radius_sqr
| float Slic3r::TriangleSelector::Cursor::radius_sqr |
|
protectedinherited |
◆ source
| Vec3f Slic3r::TriangleSelector::Cursor::source |
|
protectedinherited |
◆ trafo
◆ trafo_normal
| Transform3f Slic3r::TriangleSelector::Cursor::trafo_normal |
|
protectedinherited |
◆ TriangleSelector
| friend Slic3r::TriangleSelector::Cursor::TriangleSelector |
|
protectedinherited |
◆ uniform_scaling
| bool Slic3r::TriangleSelector::Cursor::uniform_scaling |
|
protectedinherited |
The documentation for this class was generated from the following files: