Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Requirements of Traits Class Adapters to 2D Cartesian Points

The family of traits class adapters ..._adapterC2 to 2D Cartesian points is parameterized with a point type PT and a data accessor DA [KW97]. The latter defines the coordinates-based interface between the traits class adapter and the point type. The following requirements catalog lists the primitives, i.e. types, member functions etc., that must be defined for classes PT and DA that can be used to parameterize ..._adapterC2.

Point Type (PT)

PT p;
Default constructor.

PT p ( PT);
Copy constructor.

PT& p = q Assignment.

bool p == q Equality test.

The following I/O operators are only needed, if the corresponding I/O operators of the optimisation algorithm are used.

ostream& ostream& os << p writes p to output stream os.
istream& istream& is >> & p
reads p from input stream is.

Read/Write Data Accessor (DA)

DA::FT
The number type FT has to fulfill the requirements of a CGAL field type.


DA da;
Default constructor.

DA da ( DA);
Copy constructor.

void da.get ( Point p, FT& x, FT& y)
returns the Cartesian coordinates of p in x and y, resp.

FT da.get_x ( Point p)
returns the Cartesian x-coordinate of p.
FT da.get_y ( Point p)
returns the Cartesian y-coordinate of p.

void da.set ( Point& p, FT x, FT y)
sets p to the point with Cartesian coordinates x and y.


Next: Requirements of Traits Class Adapters to 2D Homogeneous Points
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.