29#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
41#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
45#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
71 for (
size_t i = 0; i <
children.size(); i++)
276 Report(
"\nLoading default simulation...\n");
306 Report(
"\nLoading building data from " + filename +
"...\n");
309 filename.insert(0,
"buildings/");
350 if (
Load(filename) ==
false)
380 offset = Vector3::ZERO;
413#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
434 FMOD_REVERB_PROPERTIES prop = FMOD_PRESET_GENERIC;
449#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
477 for (
size_t i = 0; i <
children.size(); i++)
582 if (reset_building ==
true)
651 if (!engine || engine ==
this)
656 Vector3 min, max, a, b, c, d, newmin, newmax;
661 if (min == Vector3::ZERO && max == Vector3::ZERO)
677 newmin.x =
Min(a.x, b.x, c.x, d.x);
678 newmin.y =
Min(a.y, b.y, c.y, d.y);
679 newmin.z =
Min(a.z, b.z, c.z, d.z);
680 newmax.x =
Max(a.x, b.x, c.x, d.x);
681 newmax.y =
Max(a.y, b.y, c.y, d.y);
682 newmax.z =
Max(a.z, b.z, c.z, d.z);
705 for (
size_t i = 0; i <
children.size(); i++)
723 if (move_children ==
true)
725 for (
size_t i = 0; i <
children.size(); i++)
747 if (recursive ==
true)
void SetCameraState(const CameraState &state, bool set_floor=true)
void SetToStartPosition(bool disable_current_floor)
CameraState GetCameraState()
Vector3 GetPosition(bool relative=false)
virtual void Move(const Vector3 &vector, Real speed=1.0)
virtual Vector3 GetPosition(bool relative=false)
void Init(bool children=true)
void Loop(bool loading, bool isready)
Vector3 ToGlobal(const Vector3 &position)
bool AttachCamera(std::vector< Ogre::Camera * > &cameras, bool init_state=true)
void CutOutsideBoundaries(bool landscape=true, bool buildings=true, bool external=false, bool floors=false)
void CalculateFrameRate()
unsigned long GetCurrentTime()
std::string BuildingFilename
Vector3 FromGlobal(const Vector3 &position)
void CutInsideBoundaries(const Vector3 &min, const Vector3 &max, bool landscape=true, bool buildings=true, bool external=false, bool floors=false)
bool Start(std::vector< Ogre::Camera * > &cameras)
void Prepare(bool report=true, bool renderonly=false)
bool GetBounds(Vector3 &min, Vector3 &max)
Ogre::SceneManager * mSceneManager
void AddChild(EngineContext *engine)
bool ReportError(const std::string &message)
unsigned long finish_time
std::vector< EngineContext * > children
::SBS::CameraState * reload_state
unsigned long current_time
bool IsParent(EngineContext *engine, bool recursive=false)
ScriptProcessor * processor
void DetachCamera(bool reset_building=false)
void SetCameraState(const ::SBS::CameraState &state, bool set_floor=true)
FMOD::System * fmodsystem
ScriptProcessor * GetScriptProcessor()
void AttachCamera(std::vector< Ogre::Camera * > &cameras, bool init_state=true)
Vector3 GetCameraPosition()
void CutForEngine(EngineContext *engine)
bool Start(std::vector< Ogre::Camera * > &cameras)
bool UpdateProgress(int percent)
void Move(Vector3 &position, bool move_children=false)
std::string GetFilename()
EngineContext * GetParent()
void RemoveChild(EngineContext *engine)
::SBS::CameraState GetCameraState()
std::string InstancePrompt
bool ReportFatalError(const std::string &message)
bool Load(std::string filename)
void Report(const std::string &message)
EngineContext(EngineContext *parent, VM *vm, Ogre::SceneManager *mSceneManager, FMOD::System *fmodsystem, const Vector3 &position=Vector3::ZERO, Real rotation=0.0, const Vector3 &area_min=Vector3::ZERO, const Vector3 &area_max=Vector3::ZERO)
void ShowError(const std::string &message)
void CreateProgressDialog(const std::string &message)
void CloseProgressDialog()
unsigned long GetCurrentTime()
void Report(const std::string &message, const std::string &prompt)
bool ReportError(const std::string &message, const std::string &prompt)
std::vector< std::string > nonexistent_files
bool LoadDataFile(const std::string &filename, bool insert=false, int insert_line=0)
bool IsValidEngine(EngineContext *engine)
void SetActiveEngine(int number, bool switch_engines=false, bool force=false)
int RegisterEngine(EngineContext *engine)
int GetEngineCount(bool loading_only=false)
bool GetRenderOnStartup()
bool ReportMissingFiles(std::vector< std::string > &missing_files)
EngineContext * GetActiveEngine()
Real Min(Real a, Real b, Real c)
Real Max(Real a, Real b, Real c)
std::string ToString(int number)