Skip to main content

cbop

cbop

Classes

Name
class cbop::Bbox_2
struct cbop::SegmentComp
struct cbop::SweepEvent
struct cbop::SweepEventComp
class cbop::BooleanOpImp
class cbop::Point_2
class cbop::Contour
class cbop::Polygon
class cbop::Segment_2

Types

Name
enum BooleanOpType { INTERSECTION, UNION, DIFFERENCE, XOR}
enum EdgeType { NORMAL, NON_CONTRIBUTING, SAME_TRANSITION, DIFFERENT_TRANSITION}
enum PolygonType { SUBJECT, CLIPPING}

Functions

Name
void compute(const Polygon & subj, const Polygon & clip, Polygon & result, BooleanOpType op)
bool operator==(const Point_2 & p1, const Point_2 & p2)
bool operator!=(const Point_2 & p1, const Point_2 & p2)
std::ostream & operator<<(std::ostream & o, const Point_2 & p)
std::istream & operator>>(std::istream & i, Point_2 & p)
std::ostream & operator<<(std::ostream & o, Contour & c)
std::ostream & operator<<(std::ostream & o, Polygon & p)
std::istream & operator>>(std::istream & i, Polygon & p)
std::ostream & operator<<(std::ostream & o, const Segment_2 & p)
int findIntersection(const Segment_2 & seg0, const Segment_2 & seg1, Point_2 & ip0, Point_2 & ip1)
double signedArea(const Point_2 & p0, const Point_2 & p1, const Point_2 & p2)
double signedArea(const Point_2 & p1, const Point_2 & p2)
int sign(const Point_2 & p1, const Point_2 & p2, const Point_2 & o)
bool pointInTriangle(const Segment_2 & s, const Point_2 & o, const Point_2 & p)

Types Documentation

enum BooleanOpType

Enumerator Value Description
INTERSECTION
UNION
DIFFERENCE
XOR

enum EdgeType

Enumerator Value Description
NORMAL
NON_CONTRIBUTING
SAME_TRANSITION
DIFFERENT_TRANSITION

enum PolygonType

Enumerator Value Description
SUBJECT
CLIPPING

Functions Documentation

function compute

inline void compute(
    const Polygon & subj,
    const Polygon & clip,
    Polygon & result,
    BooleanOpType op
)

function operator==

inline bool operator==(
    const Point_2 & p1,
    const Point_2 & p2
)

function operator!=

inline bool operator!=(
    const Point_2 & p1,
    const Point_2 & p2
)

function operator<<

inline std::ostream & operator<<(
    std::ostream & o,
    const Point_2 & p
)

function operator>>

inline std::istream & operator>>(
    std::istream & i,
    Point_2 & p
)

function operator<<

std::ostream & operator<<(
    std::ostream & o,
    Contour & c
)

function operator<<

std::ostream & operator<<(
    std::ostream & o,
    Polygon & p
)

function operator>>

std::istream & operator>>(
    std::istream & i,
    Polygon & p
)

function operator<<

inline std::ostream & operator<<(
    std::ostream & o,
    const Segment_2 & p
)

function findIntersection

int findIntersection(
    const Segment_2 & seg0,
    const Segment_2 & seg1,
    Point_2 & ip0,
    Point_2 & ip1
)

function signedArea

inline double signedArea(
    const Point_2 & p0,
    const Point_2 & p1,
    const Point_2 & p2
)

Signed area of the triangle (p0, p1, p2)

function signedArea

inline double signedArea(
    const Point_2 & p1,
    const Point_2 & p2
)

Signed area of the triangle ( (0,0), p1, p2)

function sign

inline int sign(
    const Point_2 & p1,
    const Point_2 & p2,
    const Point_2 & o
)

Sign of triangle (p1, p2, o)

function pointInTriangle

inline bool pointInTriangle(
    const Segment_2 & s,
    const Point_2 & o,
    const Point_2 & p
)

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