Classes | Functions
Edge.hpp File Reference

Edge between cells. More...

#include <vector>
#include "geometry.hpp"
Include dependency graph for Edge.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Edge
 Interface between two cells. More...
 

Functions

Vector2D Parallel (Edge const &edge)
 Calculates a unit vector parallel to an edge. More...
 
double DistanceToEdge (Vector2D const &point, Edge const &edge)
 Calculates the distance of a point to an edge. More...
 
bool SegmentIntersection (Edge const &edge1, Edge const &edge2, Vector2D &Intersection, double eps=1e-8)
 Calculates the intersection of two edges. More...
 
Vector2D calc_centroid (const Edge &edge)
 Calculates the centroid of an edge. More...
 

Detailed Description

Edge between cells.

Author
Elad Steinberg

Definition in file Edge.hpp.

Function Documentation

◆ calc_centroid()

Vector2D calc_centroid ( const Edge edge)

Calculates the centroid of an edge.

Parameters
edgeAn edge
Returns
Centroid

Definition at line 88 of file Edge.cpp.

◆ DistanceToEdge()

double DistanceToEdge ( Vector2D const &  point,
Edge const &  edge 
)

Calculates the distance of a point to an edge.

Parameters
pointThe point
edgeThe edge
Returns
The minimum distance between the point and the edge

Definition at line 31 of file Edge.cpp.

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

◆ Parallel()

Vector2D Parallel ( Edge const &  edge)

Calculates a unit vector parallel to an edge.

Parameters
edgeEdge
Returns
Unit vector parallel to the edge

Definition at line 83 of file Edge.cpp.

Here is the caller graph for this function:

◆ SegmentIntersection()

bool SegmentIntersection ( Edge const &  edge1,
Edge const &  edge2,
Vector2D Intersection,
double  eps = 1e-8 
)

Calculates the intersection of two edges.

Parameters
edge1The first edge
edge2The second edge
IntersectionGets the value of the intersection point
epsThe relative tolerance in units of the smaller edge
Returns
true if the intersection is on the edges and false if it is outside them

Definition at line 45 of file Edge.cpp.

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