In file contour/Contour2D.h:

class ContourLine2D : public ContourLine

the line class associated with a Contour2D that includes some basic 2D geometric information

Inheritance:


Public Methods

Contour2D* getContour () const
returns the 2D contour where the line belongs
VertexContourLine2DIterator firstVertex () const
returns an VertexContour2D iterator on the first line vertex of the line
VertexContourLine2DIterator lastVertex () const
returns an VertexContour2D iterator on the last line vertex of the line
void computeTangent () throw(ContourLine2D::IllegalGeometry)
Computes the tangent, normal and binormal vector for each vertex of a line
virtual void removeLine ()
destroys this line if it is not the only line left in the contour otherwise do nothing
virtual VertexContour* createVertex ()
create a new vertex : use a virtual function in order to create inherited vertices

Public

Exception classes
class EmptyLine : public Exception
Exception when creating a 2D contour line without any vertices
class IllegalGeometry : public Exception
Exception when two consecutive vertices have the same position which makes the definition of normal vector impossible
Constructors
ContourLine2D (const Vec2*array, const unsigned int nb, const ContourLine::Topology top, Contour2D *c) throw(EmptyLine)
constructor based on an array of 2D vertices and its topology
ContourLine2D (unsigned int nb, Contour2D *c, ContourLine::Topology top=ContourLine::OPENED) throw(EmptyLine)
Build a line segment only by specifying the number of vertices : the vertices are then initialized along the segment defined by (0,0) and (1,0)
ContourLine2D (Contour2D *c, ContourLine::Topology top)
Build a line without any vertices
ContourLine2D (const ContourLine2D* l, Contour2D *c)
Copy constructor
destructor
virtual ~ContourLine2D ()
dummy Destructor

Inherited from ContourLine:

Public Classes

enum Topology

Public Methods

unsigned int getNbVertices() const
Topology getTopology() const
void setClosedTopology()
void setEdgePointer()
void addVertex(VertexContour *v)
ObjectsList <VertexContour> ::iterator firstVertexContour() const
ObjectsList <VertexContour> ::iterator lastVertexContour() const
VertexContour* getFirst(void) const
VertexContour* getLast(void) const
template void applyVertex(void (MT::*fn)(void))

Public

constructors

ContourLine(Contour *c, Topology t=CLOSED)
Build a line without any vertices
ContourLine(ContourLine *l)
Build a dummy line

Protected Fields

Contour* contour
Topology topology
ObjectsList <VertexContour> vertexList

Documentation

the line class associated with a Contour2D that includes some basic 2D geometric information
Exception classes

class EmptyLine: public Exception
Exception when creating a 2D contour line without any vertices

class IllegalGeometry: public Exception
Exception when two consecutive vertices have the same position which makes the definition of normal vector impossible

Constructors

ContourLine2D(const Vec2*array, const unsigned int nb, const ContourLine::Topology top, Contour2D *c) throw(EmptyLine)
constructor based on an array of 2D vertices and its topology
Throws:
EmptyLine when nb=0
Parameters:
array - an array of 2D vertex position
nb - the number of vertices in the array
top - the line topology
c - the contour where the line belongs

ContourLine2D(unsigned int nb, Contour2D *c, ContourLine::Topology top=ContourLine::OPENED) throw(EmptyLine)
Build a line segment only by specifying the number of vertices : the vertices are then initialized along the segment defined by (0,0) and (1,0)
Throws:
EmptyLine when nb=0
Parameters:
nb - the number of vertices in the array
top - the line topology
c - the contour where the line belongs

ContourLine2D(Contour2D *c, ContourLine::Topology top)
Build a line without any vertices
Parameters:
c - the 2D contour where the line belongs
top - the line topology

ContourLine2D(const ContourLine2D* l, Contour2D *c)
Copy constructor
Parameters:
a - given line
c - the contour where the line belongs

destructor

virtual ~ContourLine2D()
dummy Destructor

Contour2D* getContour() const
returns the 2D contour where the line belongs

VertexContourLine2DIterator firstVertex() const
returns an VertexContour2D iterator on the first line vertex of the line

VertexContourLine2DIterator lastVertex() const
returns an VertexContour2D iterator on the last line vertex of the line

void computeTangent() throw(ContourLine2D::IllegalGeometry)
Computes the tangent, normal and binormal vector for each vertex of a line

virtual void removeLine()
destroys this line if it is not the only line left in the contour otherwise do nothing

virtual VertexContour* createVertex()
create a new vertex : use a virtual function in order to create inherited vertices


Direct child classes:
AContourLine2D

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de