QGIS API Documentation  2.99.0-Master (c42dad3)
Public Member Functions | Protected Attributes | List of all members
Line3D Class Reference

This class represents a line. More...

#include <Line3D.h>

Public Member Functions

 Line3D ()
 
 ~Line3D ()
 
bool empty () const
 Returns true, if the Line contains no Point3D, otherwise false. More...
 
unsigned int getCurrent () const
 Returns the current position. More...
 
Point3DgetPoint () const
 Gets the point at 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...
 
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...
 

Protected Attributes

unsigned int current
 
NodecurrentNode
 
Nodehead
 
unsigned int size
 
Nodez
 

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::Line3D ( )

Definition at line 19 of file Line3D.cc.

§ ~Line3D()

Line3D::~Line3D ( )

Definition at line 30 of file Line3D.cc.

Member Function Documentation

§ empty()

bool Line3D::empty ( ) const

Returns true, if the Line contains no Point3D, otherwise false.

Definition at line 44 of file Line3D.cc.

§ getCurrent()

unsigned int Line3D::getCurrent ( ) const
inline

Returns the current position.

Definition at line 69 of file Line3D.h.

§ getPoint()

Point3D * Line3D::getPoint ( ) const
inline

Gets the point at the current position.

Definition at line 74 of file Line3D.h.

§ getSize()

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.

§ goToBegin()

void Line3D::goToBegin ( )

Sets the current Node to head.

Definition at line 76 of file Line3D.cc.

§ goToNext()

void Line3D::goToNext ( )

Goes to the next Node.

Definition at line 82 of file Line3D.cc.

§ insertPoint()

void Line3D::insertPoint ( Point3D p)

Inserts a node behind the current position and sets the current position to this new node.

Definition at line 49 of file Line3D.cc.

§ removePoint()

void Line3D::removePoint ( )

Removes the point behind the current position.

Definition at line 65 of file Line3D.cc.

Member Data Documentation

§ current

unsigned int Line3D::current
protected

Definition at line 36 of file Line3D.h.

§ currentNode

Node* Line3D::currentNode
protected

Definition at line 34 of file Line3D.h.

§ head

Node* Line3D::head
protected

Definition at line 32 of file Line3D.h.

§ size

unsigned int Line3D::size
protected

Definition at line 35 of file Line3D.h.

§ z

Node* Line3D::z
protected

Definition at line 33 of file Line3D.h.


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