Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
igl::geodesic::Edge Class Reference
+ Inheritance diagram for igl::geodesic::Edge:
+ Collaboration diagram for igl::geodesic::Edge:

Public Types

typedef SimpleVector< vertex_pointervertex_pointer_vector
 
typedef SimpleVector< edge_pointeredge_pointer_vector
 
typedef SimpleVector< face_pointerface_pointer_vector
 

Public Member Functions

 Edge ()
 
 ~Edge ()
 
double & length ()
 
face_pointer opposite_face (face_pointer f)
 
vertex_pointer opposite_vertex (vertex_pointer v)
 
bool belongs (vertex_pointer v)
 
bool is_boundary ()
 
vertex_pointer v0 ()
 
vertex_pointer v1 ()
 
void local_coordinates (Point3D *point, double &x, double &y)
 
vertex_pointer_vectoradjacent_vertices ()
 
edge_pointer_vectoradjacent_edges ()
 
face_pointer_vectoradjacent_faces ()
 
unsigned & id ()
 
PointType type ()
 

Protected Attributes

vertex_pointer_vector m_adjacent_vertices
 
edge_pointer_vector m_adjacent_edges
 
face_pointer_vector m_adjacent_faces
 
unsigned m_id
 
PointType m_type
 

Private Attributes

double m_length
 

Detailed Description

Member Typedef Documentation

◆ edge_pointer_vector

◆ face_pointer_vector

◆ vertex_pointer_vector

Constructor & Destructor Documentation

◆ Edge()

igl::geodesic::Edge::Edge ( )
inline
478 {
479 m_type = EDGE;
480 };
PointType m_type
Definition exact_geodesic.cpp:359
@ EDGE
Definition exact_geodesic.cpp:329

References igl::geodesic::EDGE, and igl::geodesic::MeshElementBase::m_type.

◆ ~Edge()

igl::geodesic::Edge::~Edge ( )
inline
482{};

Member Function Documentation

◆ adjacent_edges()

◆ adjacent_faces()

face_pointer_vector & igl::geodesic::MeshElementBase::adjacent_faces ( )
inlineinherited
348{return m_adjacent_faces;};
face_pointer_vector m_adjacent_faces
Definition exact_geodesic.cpp:356

References igl::geodesic::MeshElementBase::m_adjacent_faces.

Referenced by igl::geodesic::Mesh::build_adjacencies(), igl::geodesic::Mesh::closest_vertices(), igl::geodesic::GeodesicAlgorithmExact::construct_propagated_intervals(), is_boundary(), opposite_face(), igl::geodesic::GeodesicAlgorithmExact::possible_traceback_edges(), and igl::geodesic::GeodesicAlgorithmExact::propagate().

+ Here is the caller graph for this function:

◆ adjacent_vertices()

vertex_pointer_vector & igl::geodesic::MeshElementBase::adjacent_vertices ( )
inlineinherited

◆ belongs()

bool igl::geodesic::Edge::belongs ( vertex_pointer  v)
inline
510 {
511 return adjacent_vertices()[0]->id() == v->id() ||
512 adjacent_vertices()[1]->id() == v->id();
513 }
vertex_pointer_vector & adjacent_vertices()
Definition exact_geodesic.cpp:346

References igl::geodesic::MeshElementBase::adjacent_vertices(), and igl::geodesic::MeshElementBase::id().

Referenced by igl::geodesic::Face::next_edge(), igl::geodesic::Face::opposite_edge(), igl::geodesic::Face::opposite_vertex(), and opposite_vertex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ id()

◆ is_boundary()

bool igl::geodesic::Edge::is_boundary ( )
inline
515{return adjacent_faces().size() == 1;};
face_pointer_vector & adjacent_faces()
Definition exact_geodesic.cpp:348
unsigned size()
Definition exact_geodesic.cpp:297

References igl::geodesic::MeshElementBase::adjacent_faces(), and igl::geodesic::SimpleVector< Data >::size().

Referenced by igl::geodesic::Mesh::build_adjacencies(), igl::geodesic::GeodesicAlgorithmExact::propagate(), and igl::geodesic::Mesh::verify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ length()

◆ local_coordinates()

void igl::geodesic::Edge::local_coordinates ( Point3D point,
double &  x,
double &  y 
)
inline
523 {
524 double d0 = point->distance(v0());
525 if(d0 < 1e-50)
526 {
527 x = 0.0;
528 y = 0.0;
529 return;
530 }
531
532 double d1 = point->distance(v1());
533 if(d1 < 1e-50)
534 {
535 x = m_length;
536 y = 0.0;
537 return;
538 }
539
540 x = m_length/2.0 + (d0*d0 - d1*d1)/(2.0*m_length);
541 y = sqrt(std::max(0.0, d0*d0 - x*x));
542 return;
543 }
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition ArrayCwiseUnaryOps.h:152
vertex_pointer v1()
Definition exact_geodesic.cpp:518
vertex_pointer v0()
Definition exact_geodesic.cpp:517
const Scalar & y
Definition MathFunctions.h:552
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297

References igl::geodesic::Point3D::distance(), m_length, sqrt(), v0(), and v1().

Referenced by igl::geodesic::IntervalList::find_closest_point(), and igl::geodesic::Interval::initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ opposite_face()

face_pointer igl::geodesic::Edge::opposite_face ( face_pointer  f)
inline
487 {
488 if(adjacent_faces().size() == 1)
489 {
490 assert(adjacent_faces()[0]->id() == f->id());
491 return NULL;
492 }
493
494 assert(adjacent_faces()[0]->id() == f->id() ||
495 adjacent_faces()[1]->id() == f->id());
496
497 return adjacent_faces()[0]->id() == f->id() ?
498 adjacent_faces()[1] : adjacent_faces()[0];
499 };
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

References igl::geodesic::MeshElementBase::adjacent_faces(), and igl::geodesic::MeshElementBase::id().

Referenced by igl::geodesic::Mesh::verify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ opposite_vertex()

vertex_pointer igl::geodesic::Edge::opposite_vertex ( vertex_pointer  v)
inline
502 {
503 assert(belongs(v));
504
505 return adjacent_vertices()[0]->id() == v->id() ?
507 };
bool belongs(vertex_pointer v)
Definition exact_geodesic.cpp:509

References igl::geodesic::MeshElementBase::adjacent_vertices(), belongs(), and igl::geodesic::MeshElementBase::id().

+ Here is the call graph for this function:

◆ type()

PointType igl::geodesic::MeshElementBase::type ( )
inlineinherited
351{return m_type;};

References igl::geodesic::MeshElementBase::m_type.

Referenced by igl::geodesic::Interval::initialize(), igl::geodesic::GeodesicAlgorithmExact::list_edges_visible_from_source(), and igl::geodesic::SurfacePoint::type().

+ Here is the caller graph for this function:

◆ v0()

vertex_pointer igl::geodesic::Edge::v0 ( )
inline
517{return adjacent_vertices()[0];};

References igl::geodesic::MeshElementBase::adjacent_vertices().

Referenced by igl::geodesic::GeodesicAlgorithmExact::best_first_interval(), igl::geodesic::GeodesicAlgorithmExact::check_stop_conditions(), igl::geodesic::Interval::initialize(), local_coordinates(), igl::geodesic::GeodesicAlgorithmExact::possible_traceback_edges(), igl::geodesic::GeodesicAlgorithmExact::propagate(), igl::geodesic::GeodesicAlgorithmExact::trace_back(), and igl::geodesic::GeodesicAlgorithmExact::visible_from_source().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ v1()

vertex_pointer igl::geodesic::Edge::v1 ( )
inline
518{return adjacent_vertices()[1];};

References igl::geodesic::MeshElementBase::adjacent_vertices().

Referenced by igl::geodesic::Interval::initialize(), local_coordinates(), igl::geodesic::GeodesicAlgorithmExact::possible_traceback_edges(), igl::geodesic::GeodesicAlgorithmExact::propagate(), and igl::geodesic::GeodesicAlgorithmExact::trace_back().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_adjacent_edges

edge_pointer_vector igl::geodesic::MeshElementBase::m_adjacent_edges
protectedinherited

◆ m_adjacent_faces

face_pointer_vector igl::geodesic::MeshElementBase::m_adjacent_faces
protectedinherited

◆ m_adjacent_vertices

vertex_pointer_vector igl::geodesic::MeshElementBase::m_adjacent_vertices
protectedinherited

◆ m_id

unsigned igl::geodesic::MeshElementBase::m_id
protectedinherited

◆ m_length

double igl::geodesic::Edge::m_length
private

Referenced by length(), and local_coordinates().

◆ m_type

PointType igl::geodesic::MeshElementBase::m_type
protectedinherited

The documentation for this class was generated from the following file: