TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::place::Shape Struct Reference

#include <geom/shape.hpp>

Public Member Functions

void update_box ()
void set_point (Point p, Coord r)
 Reset to a disk, reusing point storage for scratch legality checks.

Static Public Member Functions

static Shape point (Point p, Coord r)
static Shape segment (Point a, Point b, Coord r)
static Shape polyline (std::vector< Point > pts, Coord r)
static Shape polygon (std::vector< Point > pts, Coord r=0)

Public Attributes

std::vector< Point > pts
 1 point, open polyline (>= 2), or closed polygon (>= 3)
Coord r = 0
 inflation radius
bool closed = false
 polygon interior is part of the shape
Box box
 bounding box including r

Detailed Description

Definition at line 18 of file shape.hpp.

Member Function Documentation

◆ point()

◆ polygon()

Shape tmk::geom::Shape::polygon ( std::vector< Point > pts,
Coord r = 0 )
static

◆ polyline()

Shape tmk::geom::Shape::polyline ( std::vector< Point > pts,
Coord r )
static

◆ segment()

◆ set_point()

Reset to a disk, reusing point storage for scratch legality checks.

◆ update_box()

Member Data Documentation

◆ box

bounding box including r

Definition at line 22 of file shape.hpp.

◆ closed

polygon interior is part of the shape

Definition at line 21 of file shape.hpp.

◆ pts

1 point, open polyline (>= 2), or closed polygon (>= 3)

Definition at line 19 of file shape.hpp.

◆ r

inflation radius

Definition at line 20 of file shape.hpp.


The documentation for this struct was generated from the following file: