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

The ExpansionGoal class. More...

#include <expansion.h>

Collaboration diagram for dialect::ExpansionGoal:
Collaboration graph

Public Member Functions

 ExpansionGoal (unsigned id, TreePlacement_SP tp, CardinalDir direc, double padding)
 Standard constructor. More...
 
ContainedSegment_SP computeContainedSegment (bool ignoreCollateralTreeBoxes=false)
 Compute the contained segment for this goal. More...
 
CardinalDir getDirec (void) const
 Get the direction of the goal.
 
ProjSeq_SP tryExpansionRec (ProjSeq_SP ps0, std::deque< ExpansionGoal_SP > &remainingGoals)
 Try to expand, and work recursively, attempting all remaining goals. More...
 

Detailed Description

The ExpansionGoal class.

Manages a single expansion goal point, as utilised by the ExpansionManager class.

Constructor & Destructor Documentation

◆ ExpansionGoal()

dialect::ExpansionGoal::ExpansionGoal ( unsigned  id,
TreePlacement_SP  tp,
CardinalDir  direc,
double  padding 
)
inline

Standard constructor.

Parameters
[in]idAn ID for the goal (unique for the manager).
[in]tpThe TreePlacement in question.
[in]direcThe direction of the goal, from base point to goal point.
[in]paddingPadding for tree boxes.

Member Function Documentation

◆ computeContainedSegment()

ContainedSegment_SP ExpansionGoal::computeContainedSegment ( bool  ignoreCollateralTreeBoxes = false)

Compute the contained segment for this goal.

Parameters
[in]ignoreCollateralTreeBoxesThis is useful when we are interested in computing estimates of expansion costs. At such times, we want to guess how long the contained segment might be once any collateral tree boxes have been moved away (but without actually doing the moving).

References Avoid::Point::x, and Avoid::Point::y.

Referenced by tryExpansionRec().

Here is the caller graph for this function:

◆ tryExpansionRec()

ProjSeq_SP ExpansionGoal::tryExpansionRec ( ProjSeq_SP  ps0,
std::deque< ExpansionGoal_SP > &  remainingGoals 
)

Try to expand, and work recursively, attempting all remaining goals.

Parameters
[in]ps0The projection sequence to be extended.
[in]remainingGoalsDeque of ExpansionGoals on which to recurse.
Returns
The resulting projection sequence, in which all expansion goals have been achieved.
Exceptions
Runtimeerror if any attempted projection is impossible.

References computeContainedSegment().

Here is the call graph for this function:

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