Search Grid
AUVSI Search Path Algorithm 2019-2021
Public Member Functions | Public Attributes | List of all members
Edge Struct Reference

Simple representation of an edge. More...

Public Member Functions

 Edge ()
 Default constructor.
 
 Edge (Coord vert1, Coord vert2)
 Construct an Edge given two Coords. More...
 
float_type slope () const
 Get the slope of the edge. More...
 
bool isVertical () const
 Determine if the edge is vertical. More...
 
float_type length () const
 Get the length of the edge. More...
 
float_type theta () const
 Get the angle of the edge from the horizontal in radians. More...
 
bool operator== (const Edge &op) const
 Overloaded == operator.
 

Public Attributes

Coord v1
 The vertices of the edge. More...
 
Coord v2
 
float_type a
 Coefficients for the standard form of the line (ax + by + c).
 
float_type b
 
float_type c
 

Detailed Description

Simple representation of an edge.

Constructor & Destructor Documentation

◆ Edge()

Edge::Edge ( Coord  vert1,
Coord  vert2 
)
inline

Construct an Edge given two Coords.

See also
Coord

Member Function Documentation

◆ isVertical()

bool Edge::isVertical ( ) const
inline

Determine if the edge is vertical.

Returns
true if the edge is vertical, else false

◆ length()

float_type Edge::length ( ) const
inline

Get the length of the edge.

Returns
the length of the edge
See also
float_type

◆ slope()

float_type Edge::slope ( ) const
inline

Get the slope of the edge.

Returns
the slope of the edge
See also
float_type

◆ theta()

float_type Edge::theta ( ) const
inline

Get the angle of the edge from the horizontal in radians.

Returns
the angle of the edge in radians
See also
float_type

Member Data Documentation

◆ v1

Coord Edge::v1

The vertices of the edge.

See also
Coord

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