Initial revision
[lsystem3d.git] / src / coordinate.cpp
1 // Copyright (C) 2006 Erik Dahlberg
2 //
3 // This file is part of LSystem3d.
4 //
5 // LSystem3D is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // LSystem3D is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with LSystem3D; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
20
21
22 #include "coordinate.h"
23
24
25
26 /**
27 * Constructor
28 */
29 Coordinate::Coordinate()
30 {
31 setXYZ(0.0, 0.0, 0.0);
32 }
33
34
35
36 /**
37 * Destructor
38 */
39 Coordinate::~Coordinate()
40 {
41 }
42
43
44
45 /**
46 * Get x-coordinate
47 * @return the x-coordinate
48 */
49 double Coordinate::getX()
50 {
51 return _x;
52 }
53
54
55
56 /**
57 * Get y-coordinate
58 * @return the y-coordinate
59 */
60 double Coordinate::getY()
61 {
62 return _y;
63 }
64
65
66
67 /**
68 * Get z-coordinate
69 * @return the z-coordinate
70 */
71 double Coordinate::getZ()
72 {
73 return _z;
74 }
75
76
77
78 /**
79 * Set coordinate
80 * @param x the x-coordinate
81 * @param y the y-coordinate
82 * @param z the z-coordinate
83 */
84 void Coordinate::setXYZ(double x, double y, double z)
85 {
86 _x = x;
87 _y = y;
88 _z = z;
89 }