QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Line3D.h
Go to the documentation of this file.
1 /***************************************************************************
2  Line3D.h - description
3  -------------------
4  copyright : (C) 2004 by Marco Hugentobler
5  email : [email protected]
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef LINE3D_H
18 #define LINE3D_H
19 
20 #include "Point3D.h"
21 #include "Node.h"
22 
25 class ANALYSIS_EXPORT Line3D
26 {
27  private:
29  Line3D( const Line3D& );
31  Line3D& operator=( const Line3D& );
32  protected:
34  Node* z;
36  unsigned int size;
37  unsigned int current;
38 
39  public:
40  Line3D();
41  ~Line3D();
43  bool empty() const;
45  void insertPoint( Point3D* p );
47  void removePoint();
49  Point3D* getPoint() const;
51  unsigned int getCurrent() const;
53  unsigned int getSize() const;
55  void goToBegin();
57  void goToNext();
58 };
59 
60 inline Line3D::Line3D( const Line3D& )
61 {
62 
63 }
64 
65 inline Line3D& Line3D::operator=( const Line3D& )
66 {
67  return ( *this );
68 }
69 
70 inline unsigned int Line3D::getCurrent() const
71 {
72  return current;
73 }
74 
75 inline Point3D* Line3D::getPoint() const
76 {
77  return ( currentNode->getPoint() );
78 }
79 
80 inline unsigned int Line3D::getSize() const
81 {
82  return size;
83 }
84 
85 #endif
Node * head
Definition: Line3D.h:33
Node * z
Definition: Line3D.h:34
Node is a class used by Line3D.
Definition: Node.h:24
This class represents a line.
Definition: Line3D.h:25
unsigned int size
Definition: Line3D.h:36
unsigned int getCurrent() const
Returns the current position.
Definition: Line3D.h:70
Point3D is a class to represent a three dimensional point.
Definition: Point3D.h:24
unsigned int current
Definition: Line3D.h:37
Point3D * getPoint() const
Gets the point at the current position.
Definition: Line3D.h:75
Node * currentNode
Definition: Line3D.h:35
unsigned int getSize() const
Returns the size of the line (the numbero of inserted Nodes without 'head' and 'z'.
Definition: Line3D.h:80