INTERFACE TMCFeat; (* Defines the methods to deal with the features of the corners, that is the physical characteristic (serial number, geometry, style) of the elements -- vertex, edge, border and face -- corresponding to a corner. The serial number of each element is a numerical value speficied (in the input) by the client and if the map is modified these values are recomputed (on output) by the programs. The vertex's geometry are the coordinates of the point corresponding to the vertex where the point is represented by the Plucker coefficients of its stabbing line. An edge corresponds to an oriented circle, that is, the edge's geometry is given the coefficients of the supporting circle. A halfedge corresponds to an oriented travel on an (oriented) edge, that is, an (oriented) edge where we defines a relative sense of travel on it. It's clear that, on each edge we have two halfedge, i.e., two sense of travel: one positive, in same sense as the edge and another negative, in opposite to the edge. So, the halfedge's geometry is given by the coefficients of the supporting oriented circle (the edge) plus the relative orientation (-1,0,+1) of the travel on the edge. The feature "style" defines the visual characteristics of the elements. Created in Sep. 30, 1997 by Marcus Vinicius A. Andrade Last edited in May 04, 1998 by Marcus Vinicius A. Andrade *) FROM SMGeo IMPORT Point, Circle, Arc, Sign; TYPE TNumber= CARDINAL; TStyle = CARDINAL; Element <: PublicElement; (* === general element's Feature Type === *) PublicElement = OBJECT METHODS init() : Element; (* creates a new general element *) mark(); (* sets a mark in the general element *) unmark(); (* unmarks the general element *) isMarked() : BOOLEAN; (* returns TRUE if the element is marked *) getNum() : TNumber; (* returns the element's serial number *) setNum(n: TNumber); (* sets to "n" the element's serial number *) getStyle() : TStyle; (* returns the "style" of the element *) setStyle(s: TStyle); (* sets to "s" the "style" of the element *) END; VFType <: PublicVFType; (* ==== Vertex's Feature Type ===== *) PublicVFType = Element OBJECT METHODS setGeom(p: Point); (* sets the coordinates of the vertex *) getGeom() : Point; (* returns the coordinates of the vertex *) END; EFType <: PublicEFType; (* ==== Edge's Feature Type ===== *) PublicEFType = Element OBJECT METHODS setGeom(c: Circle); (* sets the supporting circle coeff. *) getGeom() : Circle; (* returns the supporting circle coeff. *) END; HEFType <: PublicHEFType; (* ==== HalfEdge's Feature Type ===== *) PublicHEFType = OBJECT METHODS initGeom(c: Circle; d: Sign); (* creates AND initializes a halfedge *) setGeom(e: EFType; d: Sign); (* sets circle coeff. and its sense of travel *) getGeom() : Circle; (* returns the circle coeff. considering the relative sense of travel *) edge() : EFType; (* returns the egde's coeff. NOT considering the relative sense of travel *) fwd() : Sign; (* returns the (relative) orientation *) END; BFType <: PublicBFT; (* ==== Border's Feature Type ===== *) PublicBFT = Element OBJECT END; FFType <: PublicFFT; (* ==== Face's Feature Type ======= *) PublicFFT = Element OBJECT END; T <: PublicT; (* ==== Corner's Feature Type ======= *) PublicT = Element OBJECT METHODS vertex() : VFType; (* returns the vertex composing the corner *) halfEdge() : HEFType; (* returns the halfedge composing the corner *) initVertex(); (* creates a vertex on that corner *) setVertex(v: VFType); (* sets the vertex's geometry of the corner *) initHalfEdge(); (* creates a halfedge on that corner *) setHalfEdge(e: EFType; d: Sign);(* sets the halfedge's geometry of the corner *) getGeoOfArc(c: T) : Arc; (* returns the geometry of the arc (edge) corresponding to the corners "self" and "c" *) END; END TMCFeat.