1 //==============================================================================
2 // This program is free software; you can redistribute it and/or modify
3 // it under the terms of the GNU General Public License as published by
4 // the Free Software Foundation; either version 2 of the License, or
5 // (at your option) any later version.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 // GNU Library General Public License for more details.
11 //
12 // You should have received a copy of the GNU General Public License
13 // along with this program; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 //==============================================================================
16 
17 //==============================================================================
18 // File: cPositionable.cpp
19 // Project: Shooting Star
20 // Author: Jarmo Hekkanen <jarski@2ndpoint.fi>
21 // Copyrights (c) 2003 2ndPoint ry (www.2ndpoint.fi)
22 //------------------------------------------------------------------------------
23 // Revision history
24 //==============================================================================
25 
26 //==============================================================================
27 // Includes
28 #include "cPositionable.hpp"
29 //------------------------------------------------------------------------------
30 // Namespaces
31 using namespace ShootingStar;
32 //==============================================================================
33 
34 //==============================================================================
35 //! Constructor
36 /*!
37 	Position and rotation are _NOT_ set to zero in constructor so newly created
38 	objects	can be anywhere.
39 */
40 //------------------------------------------------------------------------------
cPositionable(void)41 cPositionable::cPositionable (void)
42 {
43 	// Empty
44 };
45 //==============================================================================
46 
47 //==============================================================================
48 //! Destructor
49 //------------------------------------------------------------------------------
~cPositionable(void)50 cPositionable::~cPositionable (void)
51 {
52 	// Empty
53 };
54 //==============================================================================
55 
56 //==============================================================================
57 //! Return direction vector
58 cVector2f
GetDirection(float angle) const59 cPositionable::GetDirection (float angle) const
60 {
61 	return cVector2f (	cos (D2R (GetRotation () + angle)),
62 						sin (D2R (GetRotation () + angle)));
63 }
64 //==============================================================================
65 
66 //==============================================================================
67 // EOF
68 //==============================================================================
69