SO3Engine
OgreNewt_PlayerController.h
Go to the documentation of this file.
1/*
2 OgreNewt Library
3
4 Ogre implementation of Newton Game Dynamics SDK
5
6 OgreNewt basically has no license, you may use any or all of the library however you desire... I hope it can help you in any way.
7
8 by melven
9
10*/
11#ifndef _INCLUDE_OGRENEWT_PLAYERCONTROLLER
12#define _INCLUDE_OGRENEWT_PLAYERCONTROLLER
13
14
16#include "OgreNewt_Joint.h"
17#include "OgreNewt_RayCast.h"
18#include "OgreNewt_Body.h"
19
20
21namespace OgreNewt
22{
24
27 class _OgreNewtExport PlayerController : public Joint
28 {
29 public:
31
34 PlayerController(OgreNewt::Body* child, Ogre::Real stairHeight, Ogre::Real kinematicCushion = 1.0f/64.0f);
36
38 void getVelocity(Ogre::Real &forwardSpeed, Ogre::Real& sideSpeed, Ogre::Radian& heading) const;
39
41 void setVelocity(Ogre::Real forwardSpeed, Ogre::Real sideSpeed, Ogre::Radian heading);
42
44 Ogre::Real getPlayerHeight() const;
45
46 protected:
48
51 virtual void showDebugData(Ogre::SceneNode* debugRootNode);
52
53
54 struct DebugInfo
55 {
57 Ogre::SceneNode* m_node;
58 Ogre::ManualObject* m_visualDebug;
59 };
60 std::vector<DebugInfo> m_debugInfo;
61
62 };
63
64} // end NAMESPACE OgreNewt
65
66
67#endif // _INCLUDE_OGRENEWT_PLAYERCONTROLLER
68
main class for all Rigid Bodies in the system.
base class for all joints.
virtual void showDebugData(Ogre::SceneNode *debugRootNode)
show joint visual debugging data
PlayerController(OgreNewt::Body *child, Ogre::Real stairHeight, Ogre::Real kinematicCushion=1.0f/64.0f)
constructor
Ogre::Real getPlayerHeight() const
get the Player height
void setVelocity(Ogre::Real forwardSpeed, Ogre::Real sideSpeed, Ogre::Radian heading)
set the characters velocity, the -Speed-values can be negative, sideSpeed positive means move to the ...
std::vector< DebugInfo > m_debugInfo
void getVelocity(Ogre::Real &forwardSpeed, Ogre::Real &sideSpeed, Ogre::Radian &heading) const
get currently set velocity