QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Line3D Class Reference

This class represents a line. More...

#include <Line3D.h>

Collaboration diagram for Line3D:
Collaboration graph
[legend]

Public Member Functions

 Line3D ()
 
 ~Line3D ()
 
bool empty () const
 returns true, if the Line contains no Point3D, otherwise false More...
 
void insertPoint (Point3D *p)
 inserts a node behind the current position and sets the current position to this new node More...
 
void removePoint ()
 removes the point behind the current position More...
 
Point3DgetPoint () const
 gets the point at the current position More...
 
unsigned int getCurrent () const
 returns the current position More...
 
unsigned int getSize () const
 returns the size of the line (the numbero of inserted Nodes without 'head' and 'z' More...
 
void goToBegin ()
 sets the current Node to head More...
 
void goToNext ()
 goes to the next Node More...
 

Protected Attributes

Nodehead
 
Nodez
 
NodecurrentNode
 
unsigned int size
 
unsigned int current
 

Private Member Functions

 Line3D (const Line3D &)
 copy constructor, declared private to not use it More...
 
Line3Doperator= (const Line3D &)
 assignment operator, declared private to not use it More...
 

Detailed Description

This class represents a line.

It is implemented as a single directed linked list of nodes (with related Point3D objects). Attention: the points inserted in a line are not deleted from Line3D

Definition at line 24 of file Line3D.h.

Constructor & Destructor Documentation

Line3D::Line3D ( const Line3D )
inlineprivate

copy constructor, declared private to not use it

Definition at line 59 of file Line3D.h.

Line3D::Line3D ( )
Line3D::~Line3D ( )

Member Function Documentation

bool Line3D::empty ( ) const

returns true, if the Line contains no Point3D, otherwise false

unsigned int Line3D::getCurrent ( ) const
inline

returns the current position

Definition at line 69 of file Line3D.h.

References current.

Point3D * Line3D::getPoint ( ) const
inline

gets the point at the current position

Definition at line 74 of file Line3D.h.

References currentNode, and Node::getPoint().

unsigned int Line3D::getSize ( ) const
inline

returns the size of the line (the numbero of inserted Nodes without 'head' and 'z'

Definition at line 79 of file Line3D.h.

References size.

void Line3D::goToBegin ( )

sets the current Node to head

void Line3D::goToNext ( )

goes to the next Node

void Line3D::insertPoint ( Point3D p)

inserts a node behind the current position and sets the current position to this new node

Referenced by QgsTINInterpolator::insertData().

Line3D & Line3D::operator= ( const Line3D )
inlineprivate

assignment operator, declared private to not use it

Definition at line 64 of file Line3D.h.

void Line3D::removePoint ( )

removes the point behind the current position

Member Data Documentation

unsigned int Line3D::current
protected

Definition at line 36 of file Line3D.h.

Referenced by getCurrent().

Node* Line3D::currentNode
protected

Definition at line 34 of file Line3D.h.

Referenced by getPoint().

Node* Line3D::head
protected

Definition at line 32 of file Line3D.h.

unsigned int Line3D::size
protected

Definition at line 35 of file Line3D.h.

Referenced by getSize().

Node* Line3D::z
protected

Definition at line 33 of file Line3D.h.


The documentation for this class was generated from the following file: