QGIS API Documentation  2.12.0-Lyon
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 
24 class ANALYSIS_EXPORT Line3D
25 {
26  private:
28  Line3D( const Line3D& );
30  Line3D& operator=( const Line3D& );
31  protected:
33  Node* z;
35  unsigned int size;
36  unsigned int current;
37 
38  public:
39  Line3D();
40  ~Line3D();
42  bool empty() const;
44  void insertPoint( Point3D* p );
46  void removePoint();
48  Point3D* getPoint() const;
50  unsigned int getCurrent() const;
52  unsigned int getSize() const;
54  void goToBegin();
56  void goToNext();
57 };
58 
59 inline Line3D::Line3D( const Line3D& )
60 {
61 
62 }
63 
64 inline Line3D& Line3D::operator=( const Line3D& )
65 {
66  return ( *this );
67 }
68 
69 inline unsigned int Line3D::getCurrent() const
70 {
71  return current;
72 }
73 
74 inline Point3D* Line3D::getPoint() const
75 {
76  return ( currentNode->getPoint() );
77 }
78 
79 inline unsigned int Line3D::getSize() const
80 {
81  return size;
82 }
83 
84 #endif
Node * head
Definition: Line3D.h:32
Node * z
Definition: Line3D.h:33
Node is a class used by Line3D.
Definition: Node.h:23
This class represents a line.
Definition: Line3D.h:24
unsigned int getCurrent() const
Returns the current position.
Definition: Line3D.h:69
unsigned int size
Definition: Line3D.h:35
Point3D is a class to represent a three dimensional point.
Definition: Point3D.h:23
unsigned int current
Definition: Line3D.h:36
unsigned int getSize() const
Returns the size of the line (the numbero of inserted Nodes without 'head' and 'z'.
Definition: Line3D.h:79
Point3D * getPoint() const
Gets the point at the current position.
Definition: Line3D.h:74
Point3D * getPoint() const
Returns a pointer to the Point3D object associated with the node.
Definition: Node.h:60
Node * currentNode
Definition: Line3D.h:34