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

Requirements of Traits Class Adapters to 2D Homogeneous Points

The family of traits class adapters ..._adapterH2 to 2D homogeneous 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 ..._adapterH2.

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::RT
The number type RT has to fulfill the requirements of a CGAL ring type.


DA da;
Default constructor.

DA da ( DA);
Copy constructor.

void da.get ( Point p, RT& hx, RT& hy, RT& hw)
returns the homogeneous coordinates of p in hx, hy and hw, resp.

RT da.get_hx ( Point p)
returns the homogeneous x-coordinate of p.
RT da.get_hy ( Point p)
returns the homogeneous y-coordinate of p.
RT da.get_hw ( Point p)
returns the homogeneous w-coordinate of p.

void da.set ( Point& p, RT hx, RT hy, RT hw)
sets p to the point with homogeneous coordinates hx, hy and hw.


Next: Requirements of Traits Classes for 2D Smallest Enclosing Ellipse
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.