Adaptagrams
Public Member Functions | List of all members
dialect::Nexus Class Reference

#include <faces.h>

Collaboration diagram for dialect::Nexus:
Collaboration graph

Public Member Functions

 Nexus (Node_SP u)
 Standard constructor. More...
 
void addSide (Side_SP side)
 Add a Side to the Nexus.
 
std::set< Side_SP > getNeighboursOfADirection (CompassDir direc)
 Find out what are the first objects you hit as you try sweeping both clockwise and anticlockwise, starting from a given direction. More...
 
std::string toString (void) const
 Write a string representation.
 

Detailed Description

Regarded as a member of a Face F, a Node u belongs to certain Sides si of F. As we traverse the face in the clockwise direction (i.e. so that the interior of the face is always to the /right/), each Side si gets a direction, and therefore may stand in one of eight relations to Node u: it may be /entering/ or /exiting/, and this may be from or to any of the four cardinal compass directions.

A single Side may stand in two such relations, as when the Node lies along the middle of the Side, or else in just one such relation, as when a Node lies at one end or the other.

A Nexus represents a Node in this capacity as a "joining point" of several Sides of a Face. It stores eight "slots" that are either empty or else occupied by a Side object.

Constructor & Destructor Documentation

◆ Nexus()

dialect::Nexus::Nexus ( Node_SP  u)
inline

Standard constructor.

Parameters
[in]uThe Node that this Nexus is to represent.

Member Function Documentation

◆ getNeighboursOfADirection()

std::set< Side_SP > Nexus::getNeighboursOfADirection ( CompassDir  direc)

Find out what are the first objects you hit as you try sweeping both clockwise and anticlockwise, starting from a given direction.

Parameters
[in]direcThe given direction.
Returns
Set of Sides.
Note
The size of the returned set will be either 0, 1, or 2, according to whether the number of filled slots in this Nexus is 0, 1, or more, respectively.

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