CGAL::Env_surface_data_traits_3<Traits,XyData,SData,Cnv>

Definition

The class Env_surface_data_traits_3<Traits,XyData,SData,Cnv> is a model of the EnvelopeTraits_3 concept and serves as a decorator class that allows the extension of the surfaces defined by the base traits-class (the Traits parameter), which serves as a geometric traits-class (a model of the EnvelopeTraits_3 concept), with extraneous (non-geometric) data fields.

The traits-class decorator extends the Surface_3 and the Xy_monotone_surface_3 types as detailed below. Each Surface_3 object is associated with a single data field of type SData, and each Xy_monotone_surface_3 object is associated with a single data field of type XyData. When a surface is subdivided into xy-monotone surfaces, its data field is converted using the conversion functor, which is specified by the Cnv template-parameter, and the resulting objects is copied to all Xy_monotone_surface_3 objects induced by this surface. The conversion functor should provide an operator with the following prototype:
XyData operator() (const SData& d) const;

By default, the two data types are the same, so the conversion operator is trivial and just copies the data object:

SData = XyData
Cnv = _Default_convert_functor<SData,XyData>

#include <CGAL/Env_surface_data_traits_3.h>

Is Model for the Concepts

EnvelopeTraits_3

Types

typedef Traits Base_traits_3; the base traits-class.
typedef typename Base_traits_3::Surface_3
Base_surface_3; the base surface.
typedef typename Base_traits_3::Xy_monotone_surface_3
Base_xy_monotone_surface_3; the base xy-monotone surface surface.

typedef Cnv Convert; the conversion functor.

typedef SData Surface_data; the type of data associated with surfaces.
typedef XyData Xy_monotone_surface_data; the type of data associated with xy-monotone surfaces.

Inherits From

Base_traits_3

Class Env_surface_data_traits_3<Traits,XyData,SData,Cnv>::Surface_3

The Surface_3 class nested within the surface-data traits extends the Base_traits_3::Surface_3 type with an extra data field.

Inherits From

Base_surface_3

Creation

Env_surface_data_traits_3<Traits,XyData,SData,Cnv>::Surface_3 s;
default constructor.


Env_surface_data_traits_3<Traits,XyData,SData,Cnv>::Surface_3 s ( Base_surface_3 base);
constructs surface from the given base surface with uninitialized data field.


Env_surface_data_traits_3<Traits,XyData,SData,Cnv>::Surface_3 s ( Base_surface_3 base, Surface_data data);
constructs surface from the given base surface with an attached data field.

Access Functions

Surface_data s.data () returns the data field (a non-const version, which returns a reference to the data object, is also available).

void s.set_data ( Surface_data data) sets the data field.

Class Env_surface_data_traits_3<Traits,XyData,SData,Cnv>::Xy_monotone_surface_3

The Xy_monotone_surface_3 class nested within the surface-data traits extends the Base_traits_3::Xy_monotone_surface_3 type with an extra data field.

Inherits From

Base_xy_monotone_surface_3

Creation

Arr_surface_data_traits_3<Tr,XData,Mrg,CData,Cnv>::Xy_monotone_surface_3 xys;
default constructor.


Arr_surface_data_traits_3<Tr,XData,Mrg,CData,Cnv>::Xy_monotone_surface_3 xys ( Base_xy_monotone_surface_3 base);
constructs an xy-monotone surface from the given base surface with uninitialized data field.


Arr_surface_data_traits_3<Tr,XData,Mrg,CData,Cnv>::Xy_monotone_surface_3 xys ( Base_xy_monotone_surface_3 base,
Xy_monotone_surface_data data);
constructs an x-monotone surface from the given base x-monotone surface with an attached data field.

Access Functions

Xy_monotone_surface_data xys.data () returns the field (a non-const version, which returns a reference to the data object, is also available).

void xys.set_data ( Xy_monotone_surface_data data)
sets the data field.