Class HeadlandGeneratorBase

Inheritance Relationships

Derived Type

Class Documentation

class HeadlandGeneratorBase

Base class to generate the headlands.

Subclassed by f2c::hg::ConstHL

Public Functions

virtual F2CCells generateHeadlands(const F2CCells &field, double dist_headland) = 0

Get the regions of the field without headlands.

Parameters:
  • _field – Original field

  • _dist_headland – Width of the headland

Returns:

Field without headlands

virtual F2CCells generateHeadlandArea(const F2CCells &field, double swath_width, int n_swaths) = 0

Generate headland area of the field for a given number of swaths with given width.

Parameters:
  • field – Borders of the field and the obstacles on it.

  • swath_width – Width of each headland swath.

  • n_swaths – Number of headland swaths.

Returns:

Headland area

virtual std::vector<F2CCells> generateHeadlandSwaths(const F2CCells &field, double swath_width, int n_swaths, bool dir_out2in = true) = 0

Generate headland swaths of the field for a given number of swaths with given width.

Parameters:
  • field – Borders of the field and the obstacles on it.

  • swath_width – Width of each headland swath.

  • n_swaths – Number of headland swaths.

  • dir_out2in – When true, headland swaths are created from outer borders to inner borders. Otherwise, they are created from inner borders to outers.

Returns:

Vector of size n_swaths for each headland swath. Each F2CLinearRing on it is a headland swath ring.

virtual ~HeadlandGeneratorBase() = default