Fixed windings on map.
[poopmup2.git] / poopmup / birdcam.h
blob69d402d4f4388aadfdc1616576a1a9d0e161ac05
1 /**
2 * @file poopmup/birdcam.h
3 * The public interface file for the birdcam class.
5 * Copyright 2008 Stephen M. Webb <bregma@poopmup.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef POOPMUP_BIRDCAM_H_
22 #define POOPMUP_BIRDCAM_H_
24 #include <iosfwd>
25 #include <poopmup/core/boundingsphere.h>
26 #include <poopmup/core/vector.h>
29 namespace Poopmup
31 /**
32 * The pigeon camera.
34 class Birdcam
36 public:
37 /** @brief Constructs a birdcam. */
38 Birdcam();
40 /** @brief Destroys a birdcam. */
41 ~Birdcam();
43 Core::BoundingSphere boundingSphere() const;
44 Core::Vector dest() const;
46 /** @brief Moves the POV. */
47 void translateBy(const Core::Vector& v);
49 /** Points the beak up or down. */
50 Birdcam& pitch(float theta);
52 /** Turns left or rights. */
53 Birdcam& yaw(float theta);
55 Birdcam& updatePosition();
57 /** Changes speed. */
58 Birdcam& accelerate(float amount);
60 /** @brief Sets the current viewpoint in the render context. */
61 void setViewpoint() const;
63 friend std::ostream& operator<<(std::ostream&, const Birdcam&);
65 private:
66 Core::Vector m_position;
67 Core::Vector m_heading;
68 Core::Vector m_up;
69 float m_velocity;
72 /** Serialized the Birdcam to an output stream. */
73 std::ostream& operator<<(std::ostream&, const Birdcam&);
74 } // namespace Poopmup
76 #endif // POOPMUP_BIRDCAM_H_