TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::geom::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()

Shape tmk::geom::Shape::point ( Point p,
Coord r )
static

◆ 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()

Shape tmk::geom::Shape::segment ( Point a,
Point b,
Coord r )
static

◆ set_point()

void tmk::geom::Shape::set_point ( Point p,
Coord r )

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

◆ update_box()

void tmk::geom::Shape::update_box ( )

Member Data Documentation

◆ box

Box tmk::geom::Shape::box

bounding box including r

Definition at line 22 of file shape.hpp.

◆ closed

bool tmk::geom::Shape::closed = false

polygon interior is part of the shape

Definition at line 21 of file shape.hpp.

◆ pts

std::vector<Point> tmk::geom::Shape::pts

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

Definition at line 19 of file shape.hpp.

◆ r

Coord tmk::geom::Shape::r = 0

inflation radius

Definition at line 20 of file shape.hpp.


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