Skip to main content

cbop::Polygon

cbop::Polygon

#include <polygon.h>

Public Types

Name
typedef std::vector< Contour >::iterator iterator
typedef std::vector< Contour >::const_iterator const_iterator

Public Functions

Name
Polygon()
bool open(const std::string & filename)
void join(const Polygon & pol)
Contour & contour(unsigned int p)
const Contour & contour(unsigned int p) const
Contour & operator[](unsigned int p)
const Contour & operator[](unsigned int p) const
unsigned int ncontours() const
unsigned int nvertices() const
Bbox_2 bbox() const
void move(double x, double y)
void push_back(const Contour & c)
Contour & back()
const Contour & back() const
void pop_back()
void erase(iterator i)
void clear()
iterator begin()
iterator end()
const_iterator begin() const
const_iterator end() const
void computeHoles()

Public Types Documentation

typedef iterator

typedef std::vector<Contour>::iterator cbop::Polygon::iterator;

typedef const_iterator

typedef std::vector<Contour>::const_iterator cbop::Polygon::const_iterator;

Public Functions Documentation

function Polygon

inline Polygon()

function open

bool open(
    const std::string & filename
)

function join

void join(
    const Polygon & pol
)

function contour

inline Contour & contour(
    unsigned int p
)

Get the p-th contour

function contour

inline const Contour & contour(
    unsigned int p
) const

function operator[]

inline Contour & operator[](
    unsigned int p
)

function operator[]

inline const Contour & operator[](
    unsigned int p
) const

function ncontours

inline unsigned int ncontours() const

Number of contours

function nvertices

unsigned int nvertices() const

Number of vertices

function bbox

Bbox_2 bbox() const

Get the bounding box

function move

void move(
    double x,
    double y
)

function push_back

inline void push_back(
    const Contour & c
)

function back

inline Contour & back()

function back

inline const Contour & back() const

function pop_back

inline void pop_back()

function erase

inline void erase(
    iterator i
)

function clear

inline void clear()

function begin

inline iterator begin()

function end

inline iterator end()

function begin

inline const_iterator begin() const

function end

inline const_iterator end() const

function computeHoles

void computeHoles()

Updated on 2026-11-13 at 20:25:42 +0000