Converted to ECS, physics fix
This commit is contained in:
50
src/gamedata/Components.h
Normal file
50
src/gamedata/Components.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef COMPONENTS_H_
|
||||
#define COMPONENTS_H_
|
||||
#include <Ogre.h>
|
||||
#include <OgreBullet.h>
|
||||
namespace ECS
|
||||
{
|
||||
struct GameData {
|
||||
int tmp;
|
||||
};
|
||||
struct EngineData {
|
||||
Ogre::SceneManager *mScnMgr;
|
||||
Ogre::Bullet::DynamicsWorld *mWorld;
|
||||
float delta;
|
||||
};
|
||||
struct Vector3 {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
bool zeroLength() const;
|
||||
};
|
||||
struct Vector2 {
|
||||
float x, y;
|
||||
};
|
||||
struct Input {
|
||||
uint32_t control;
|
||||
uint32_t control_prev;
|
||||
Vector3 motion;
|
||||
Vector2 mouse;
|
||||
float wheel_y;
|
||||
bool mouse_moved;
|
||||
bool wheel_moved;
|
||||
bool fast;
|
||||
Input()
|
||||
: control(0)
|
||||
, control_prev(0)
|
||||
, motion({ 0, 0, 0 })
|
||||
, fast(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
struct Camera {
|
||||
Ogre::SceneNode *mCameraNode;
|
||||
Ogre::Camera *mCamera;
|
||||
bool configured;
|
||||
Ogre::SceneNode *mCameraPivot;
|
||||
Ogre::SceneNode *mCameraGoal;
|
||||
Ogre::Real mPivotPitch;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user