Adaptagrams
|
The ExpansionGoal class. More...
#include <expansion.h>
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... | |
The ExpansionGoal class.
Manages a single expansion goal point, as utilised by the ExpansionManager class.
|
inline |
Standard constructor.
[in] | id | An ID for the goal (unique for the manager). |
[in] | tp | The TreePlacement in question. |
[in] | direc | The direction of the goal, from base point to goal point. |
[in] | padding | Padding for tree boxes. |
ContainedSegment_SP ExpansionGoal::computeContainedSegment | ( | bool | ignoreCollateralTreeBoxes = false | ) |
Compute the contained segment for this goal.
[in] | ignoreCollateralTreeBoxes | This 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().
ProjSeq_SP ExpansionGoal::tryExpansionRec | ( | ProjSeq_SP | ps0, |
std::deque< ExpansionGoal_SP > & | remainingGoals | ||
) |
Try to expand, and work recursively, attempting all remaining goals.
[in] | ps0 | The projection sequence to be extended. |
[in] | remainingGoals | Deque of ExpansionGoals on which to recurse. |
Runtime | error if any attempted projection is impossible. |
References computeContainedSegment().