Used a more uniform of logging and added a commandline parser.
[UnsignedByte.git] / src / Resource / Path.h
blob21f05e150c018dc5294c3e68cebb8a79713df0be
1 /***************************************************************************
2 * Copyright (C) 2007 by Daniel Brody *
3 * erasnode@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program 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 this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #pragma once
22 /**
23 * @file Path.h
24 * This file contains the Path class.
26 * @see Path
27 */
29 #include <vector>
30 #include "Coordinate.h"
32 class Path
34 public:
35 /**
36 * \brief Constructor
37 * \param from Starting point
38 * \param to Destination
40 Path(const Coordinate& from, const Coordinate& to);
42 /**
43 * \brief Destructor
45 ~Path() {};
47 /**
48 * \brief Getter
49 * \return Returns our start point
51 const Coordinate& getFrom() const;
53 /**
54 * \brief Getter
55 * \return Returns our destination
57 const Coordinate& getTo() const;
59 /**
60 * \brief Setter
61 * \param from Sets our start point
63 void setFrom(const Coordinate& from);
65 /**
66 * \brief Setter
67 * \param to Sets our destination
69 void setTo(const Coordinate& to);
71 /**
72 * \brief Gets the length of the largest component since all other components can be combined into the largest
73 * \return The largest component
75 long length() const; //returns distance between coords
77 /**
78 * \brief The direction one should travel in from 'from' to reach 'to'
79 * \return Unit coord for approx direction
81 const Coordinate& direction() const;
83 /**
84 * \brief Retreives the exact path between From to To.
85 * \return Set of exact directions
87 std::vector<Coordinate> route() const;
89 private:
90 Coordinate m_from; /**< The coordinate that defines the start point of this Path. */
91 Coordinate m_to; /**< The coordinate that defines the end point of this Path. */
93 long m_xcomponent; /**< The current x component of this Path. */
94 long m_ycomponent; /**< The current y component of this Path. */
95 long m_zcomponent; /**< The current z component of this Path. */
97 /**
98 * \brief Resets internal coordinates
100 void reset();