Fixed some transforms, move to 3d and quaternion math in progress...
[ne.git] / src / phys / player.h
blob7b730df22285652d8fe3b9c227eb5139a6468d8a
1 /************************************************************************
2 This file is part of NE.
4 NE is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 NE is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with NE. If not, see <http://www.gnu.org/licenses/>.
16 ************************************************************************/
18 #ifndef PLAYER_H_
19 #define PLAYER_H_
21 #include "object.h"
22 #include "base/vec.h"
24 class Player: public Object {
25 public:
26 Player(float height, float density=1);
27 virtual ~Player();
29 virtual void draw();
30 virtual void update();
32 const Vec3f getFeet();
33 const Vec3f getBottom();
35 float getBodyHeight();
37 inline bool isStanding() {return m_standing;}
39 protected:
40 void update_ray();
42 dCapsule *m_capsule;
43 dRay *m_ray;
45 private:
46 bool m_standing;
47 dReal m_depth;
50 #endif /* PLAYER_H_ */