In file contour/Contour.h:

class Contour

Contour class that only describes topological properties of contours

Inheritance:


Public Classes

template class VertexIterator
a class that allows to iterate on all vertices of all lines
const Contour* contour
the contour where are the vertices
ObjectsList <ContourLine> :: iterator currentLine
the current Line pointed by the iterator
ObjectsList <VertexContour> :: iterator currentVertex
the current vertex pointed by the iterator
constructor
VertexIterator (const Contour *c)
Build a VertexIterator given a Contour
T* operator++ (int) throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator ++ that pre-increment the iterator
T* operator++ (void) throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator ++ that post-increment the iterator
T* operator * (void) const throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator () that returns the pointed element
void first (void)
set the iterator to point on the first vertex
bool isAtEnd (void)
returns true if list end was reached and there is no current element anymore
enum DisplayMode
The type of display
enum VertexDisplayMode
whether to display vertices
enum SelectionMode
the different objects that can be selected

Public Methods

VertexIterator <VertexContour> firstVertex () const
returns a VertexIterator of type T pointing on the contour
template castiterator <ContourLine,V> firstLine (void) const
returns a line Iterator of type V
template castiterator <ContourLine,V> lastLine (void) const
returns a line Iterator of type V
template L* getFirstLine (void) const
returns the first Line of type L *
ObjectsList <ContourLine> ::iterator firstLineContour () const
returns a line Iterator of type Line on the first item
ObjectsList <ContourLine> ::iterator lastLineContour () const
returns a line Iterator of type Line on the last item
void addLine (ContourLine *l)
add the line in the first position in the line list
unsigned int getNbLines () const
Returns the number of lines of a contour
unsigned int getNbVertices () const
Returns the total number of vertices
virtual void mergeEdges (EdgeContour *e1, EdgeContour *e2)
Merge two edges that may not belong to the same contour
virtual ContourLine* createLine (ContourLine::Topology top)
create a new line : use a virtual function in order to create inherited lines
template void applyLine (void (T::*fn)(const unsigned int ), const unsigned int v)
Apply a function on all lines of a contour
template void applyVertex (void (T::*fn)(void))
Apply a function on all vertices of a contour
template void applyVertex (void (T::*fn)(const double), const double v)
Apply a function on all vertices of a contour
template void applyVertex (void (T::*fn)(const unsigned int ), const unsigned int v)
Apply a function on all vertices of a contour
void initColor ()
sets the color variables
void updateBoundingBox ()
recompute the geometry of the bounding box
void getLineColor (float &r, float &g, float &b) const
Returns the display color of lines
void getSelectedLineColor (float &r, float &g, float &b) const
Returns the display color of selected lines
void getVertexColor (float &r, float &g, float &b) const
Returns the display color of vertices
void getSelectedVertexColor (float &r, float &g, float &b) const
Returns the display color of selected vertices
float getLineWidth () const
Returns the width of a line
float getVertexSize () const
Returns the size of a displayed vertex
DisplayMode getDisplayMode () const
Returns the display mode (off or on)
SelectionMode getSelectionMode () const
Returns the selection mode
VertexDisplayMode getVertexDisplayMode () const
Returns the vertex display mode
void setLineColor (const float r, const float g, const float b)
Sets the display color of lines
void setSelectedLineColor (const float r, const float g, const float b)
Sets the display color of selected lines
void setVertexColor (const float r, const float g, const float b)
Sets the display color of vertices
void setSelectedVertexColor (const float r, const float g, const float b)
Sets the display color of selected vertices
void setLineWidth (const float w)
Sets the width of a line
void setVertexSize (const float s)
Sets the size of a displayed vertex
void setDisplayMode (const DisplayMode mode)
Sets the display mode
void setVertexDisplayMode (const VertexDisplayMode mode)
Sets the vertex display mode
void setSelectionMode (const SelectionMode mode)
Sets the selection mode

Public

constructor
Contour ()
Build a contour
destructor
virtual ~Contour ()
empty

Protected Fields

ObjectsList <ContourLine> lineList
the list of lines
float lineColor [3]
the current color of a line
static const float defaultLineColor [3]
the default color of a line
float selectedLineColor [3]
the current color of a selected line
static const float defaultSelectedLineColor [3]
the default color of a selected line
float selectedVertexColor [3]
the current color of a selected vertex
static const float defaultSelectedVertexColor [3]
the default color of a selected vertex
float vertexColor [3]
the current color of a vertex
static const float defaultVertexColor [3]
the default color of a vertex
float lineWidth
the current line width for the display of all lines
static const float defaultLineWidth
the default line width for the display of all lines
float vertexSize
the current vertex size for the display of all vertices
static const float defaultVertexSize
the deafult vertex size for the display of all vertices
DisplayMode displayMode
The type of display
VertexDisplayMode vertexDisplayMode
Should the vertices be displayed
SelectionMode selectionMode
the selection mode

Documentation

Contour class that only describes topological properties of contours
ObjectsList <ContourLine> lineList
the list of lines

template class VertexIterator
a class that allows to iterate on all vertices of all lines

const Contour* contour
the contour where are the vertices

ObjectsList <ContourLine> :: iterator currentLine
the current Line pointed by the iterator

ObjectsList <VertexContour> :: iterator currentVertex
the current vertex pointed by the iterator

constructor

VertexIterator(const Contour *c)
Build a VertexIterator given a Contour
Parameters:
c - the contour where to iterate

T* operator++(int) throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator ++ that pre-increment the iterator
Throws:
ObjectsList ::Iterator::AccessBeyondList if iterator reached list end

T* operator++(void) throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator ++ that post-increment the iterator
Throws:
ObjectsList ::Iterator::AccessBeyondList if iterator reached list end

T* operator *(void) const throw(ObjectsList<ContourLine>::iterator::AccessBeyondList)
Operator () that returns the pointed element
Throws:
ObjectsList ::Iterator::AccessBeyondList if iterator reached the end of the list
Returns:
the vertex of type T pointed by the iterator

void first(void)
set the iterator to point on the first vertex

bool isAtEnd(void)
returns true if list end was reached and there is no current element anymore

VertexIterator <VertexContour> firstVertex() const
returns a VertexIterator of type T pointing on the contour
Returns:
s the VertexIterator pointing on the first contour vertex

template castiterator <ContourLine,V> firstLine(void) const
returns a line Iterator of type V
Returns:
a CastIterator of type V on the lines of a Contour

template castiterator <ContourLine,V> lastLine(void) const
returns a line Iterator of type V
Returns:
a CastIterator of type V on the lines of a Contour

template L* getFirstLine(void) const
returns the first Line of type L *

ObjectsList <ContourLine> ::iterator firstLineContour() const
returns a line Iterator of type Line on the first item
Returns:
a CastIterator of type Line on the lines of a Contour

ObjectsList <ContourLine> ::iterator lastLineContour() const
returns a line Iterator of type Line on the last item
Returns:
a CastIterator of type Line on the lines of a Contour

void addLine(ContourLine *l)
add the line in the first position in the line list

unsigned int getNbLines() const
Returns the number of lines of a contour

unsigned int getNbVertices() const
Returns the total number of vertices

virtual void mergeEdges(EdgeContour *e1, EdgeContour *e2)
Merge two edges that may not belong to the same contour

virtual ContourLine* createLine(ContourLine::Topology top)
create a new line : use a virtual function in order to create inherited lines

constructor

Contour()
Build a contour

destructor

virtual ~Contour()
empty

template void applyLine(void (T::*fn)(const unsigned int ), const unsigned int v)
Apply a function on all lines of a contour
Parameters:
fn - a function of prototype void (T::*fn)(const unsigned int) that is a member function of type T that must be derived class of Contour::Line
v - a unsigned int value that is used as a parameter of function fn

template void applyVertex(void (T::*fn)(void))
Apply a function on all vertices of a contour
Parameters:
fn - a function of prototype void (T::*fn)(void) that is a member function of type T that must be derived class of VertexContour

template void applyVertex(void (T::*fn)(const double), const double v)
Apply a function on all vertices of a contour
Parameters:
fn - a function of prototype void (T::*fn)(const double) that is a member function of type T that must be derived class of VertexContour
v - a double value that is used as a parameter of function fn

template void applyVertex(void (T::*fn)(const unsigned int ), const unsigned int v)
Apply a function on all vertices of a contour
Parameters:
fn - a function of prototype void (T::*fn)(const unsigned int) that is a member function of type T that must be derived class of VertexContour
v - a unsigned int value that is used as a parameter of function fn

enum DisplayMode
The type of display

enum VertexDisplayMode
whether to display vertices

enum SelectionMode
the different objects that can be selected

float lineColor[3]
the current color of a line

static const float defaultLineColor[3]
the default color of a line

float selectedLineColor[3]
the current color of a selected line

static const float defaultSelectedLineColor[3]
the default color of a selected line

float selectedVertexColor[3]
the current color of a selected vertex

static const float defaultSelectedVertexColor[3]
the default color of a selected vertex

float vertexColor[3]
the current color of a vertex

static const float defaultVertexColor[3]
the default color of a vertex

float lineWidth
the current line width for the display of all lines

static const float defaultLineWidth
the default line width for the display of all lines

float vertexSize
the current vertex size for the display of all vertices

static const float defaultVertexSize
the deafult vertex size for the display of all vertices

DisplayMode displayMode
The type of display

VertexDisplayMode vertexDisplayMode
Should the vertices be displayed

SelectionMode selectionMode
the selection mode

void initColor()
sets the color variables

void updateBoundingBox()
recompute the geometry of the bounding box

void getLineColor(float &r, float &g, float &b) const
Returns the display color of lines

void getSelectedLineColor(float &r, float &g, float &b) const
Returns the display color of selected lines

void getVertexColor(float &r, float &g, float &b) const
Returns the display color of vertices

void getSelectedVertexColor(float &r, float &g, float &b) const
Returns the display color of selected vertices

float getLineWidth() const
Returns the width of a line

float getVertexSize() const
Returns the size of a displayed vertex

DisplayMode getDisplayMode() const
Returns the display mode (off or on)

SelectionMode getSelectionMode() const
Returns the selection mode

VertexDisplayMode getVertexDisplayMode() const
Returns the vertex display mode

void setLineColor(const float r, const float g, const float b)
Sets the display color of lines

void setSelectedLineColor(const float r, const float g, const float b)
Sets the display color of selected lines

void setVertexColor(const float r, const float g, const float b)
Sets the display color of vertices

void setSelectedVertexColor(const float r, const float g, const float b)
Sets the display color of selected vertices

void setLineWidth(const float w)
Sets the width of a line

void setVertexSize(const float s)
Sets the size of a displayed vertex

void setDisplayMode(const DisplayMode mode)
Sets the display mode

void setVertexDisplayMode(const VertexDisplayMode mode)
Sets the vertex display mode

void setSelectionMode(const SelectionMode mode)
Sets the selection mode


Direct child classes:
Contour3D
Contour2D

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