1 /* === S I N F G =========================================================== */
3 ** \brief Curve Set Header
5 ** $Id: curveset.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_CURVESET_H
25 #define __SINFG_CURVESET_H
27 /* === H E A D E R S ======================================================= */
28 #include "blinepoint.h"
31 /* === M A C R O S ========================================================= */
33 /* === T Y P E D E F S ===================================================== */
35 /* === C L A S S E S & S T R U C T S ======================================= */
47 CurvePoint(const Point &pin, const Vector &left, const Vector &right);
49 CurvePoint(const BLinePoint &bpoint);
54 bool invert; //winding order...
56 void CleanUp(int curve = 0);
59 typedef std::vector<CurvePoint> region;
60 typedef std::vector<region> set_type;
62 set_type set; //specifies a region object (assumes looping)
64 void SetClamp(int &i, int &si);
71 //anything supporting iterator type operations
72 template < typename Iterator >
73 CurveSet(Iterator begin, Iterator end, bool invert = false)
75 set.push_back(std::vector<CurvePoint>(begin,end));
79 CurveSet operator &(const CurveSet &rhs) const; //intersect
80 CurveSet operator |(const CurveSet &rhs) const; //union
81 CurveSet operator -(const CurveSet &rhs) const; //subtract
85 int intersect(const Point &p) const;
89 /* === E N D =============================================================== */