Class Edge

Class Documentation

class Edge

Represents a triangle edge and has all information related to it.

Public Functions

Edge(const cNode &n0, const cNode &n1)

Construct a new Edge object.

Parameters:
  • n0[in]

  • n1[in]

bool operator==(const Edge &e) const

Comparison operator. Two Edge(s) will be equal if they have the same hash.

Parameters:

e[in]

bool operator!=(const Edge &e) const

Negation of the comparison operator.

Parameters:

e[in]

void updateLocal(const Eigen::Affine3d &tf) const

Updates the local coordinates of both Node(s).

Parameters:

tf[in]

Point midPoint() const

Returns the midpoint of the Edge in local coordinates.

Point midPointGlobal() const

Returns the midpoint of the Edge in global coordinates.

Vector normal() const

Returns a normal vector to the Edge.

double trackWidth(const Vector &dir) const

Returns the estimated track width for this particular Edge taking into account the direction.

Parameters:

dir[in]

Public Members

const cNode n0

An Edge is defined by two Node(s) (whose points create an edge).

const cNode n1
const double len

The length of the Edge.

Friends

friend class std::hash< Edge >
friend std::ostream &operator<<(std::ostream &os, const Edge &e)

Cout operator.

Parameters:
  • os[inout]

  • [int] – e