Next: , Previous: Path Destructor, Up: Path Reference


26.4 Operators

— Virtual function: Transform operator*= (const Transform& t)

Calls Point::operator*=(t) on each of the Points on the Path. See Point Reference; Operators. This has the effect of transforming the entire Path by t. Please note that Path does not have a transform data member of its own.

— Function: void operator+= (const Point& pt)

Copies pt and pushes a pointer to the copy onto points. The last connector in the Path will be used to connect the new Point and the previous one.

          Point A(1, 2, 3);
          Point B(3, 4, 5);
          Path q;
          q += A;
          q += B;
          q.show("q:");
          -| q:
             (1, 2, 3) -- (3, 4, 5);
const function: Path operator+ (const Point& pt)

Copies the Path and pt, and pushes a pointer to the copy of pt onto points in the new Path. The last connector in the new Path will be used to connect the new Point and the previous one. The Path remains unchanged.

— Function: void operator&= (const Path& pa)

Concatenates two Paths. The result is assigned to *this. Neither *this nor pa may be cyclical, i.e., cycle_switch must be false for both Paths.

const function: Path operator& (const Path& pa)

Returns a Path representing the concatenation of *this and pa. *this remains unchanged. Neither *this nor pa may be cyclical, i.e., cycle_switch must be false for both Paths.

— Function: void operator+= (const string s)

Pushes s onto connectors.