#pragma once #include #include "vector3.h" #include "star_system.h" class Body; class Frame; /* The place all the 'Body's exist in. */ class Space { public: static void Init(void); static void Clear(void); static void BuildSystem(StarSystem* s); static void GenBody(StarSystem* s, StarSystem::SBody* b, Frame* f); static void TimeStep(float step); static void AddBody(Body*); static void KillBody(Body*); static void Render(const Frame* cam_frame); static Frame* GetRootFrame(void) { return rootFrame; } static dWorldID world; static std::list bodies; typedef std::list::iterator bodiesIter_t; private: static void UpdateFramesOfReference(void); static void CollideFrame(Frame* f); static void PruneCorpses(void); static Frame* rootFrame; //static std::list rootFrames; static std::list corpses; };