153 OgreBulletDynamics::DynamicsWorld *
mWorld;
202 SBS(Ogre::SceneManager* mSceneManager, FMOD::System *fmodsystem,
int instance_number,
const Vector3 &position = Vector3::ZERO,
Real rotation = 0.0f,
const Vector3 &area_min = Vector3::ZERO,
const Vector3 &area_max = Vector3::ZERO);
205 bool Start(std::vector<Ogre::Camera*> &cameras);
207 bool AddWallMain(
Wall* wallobject,
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real height_in1,
Real height_in2,
Real altitude1,
Real altitude2,
Real tw,
Real th,
bool autosize);
208 bool AddFloorMain(
Wall* wallobject,
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real altitude1,
Real altitude2,
bool reverse_axis,
bool texture_direction,
Real tw,
Real th,
bool autosize,
bool legacy_behavior =
false);
209 void CalculateFrameRate();
210 void Loop(
bool loading,
bool isready);
211 Wall* CreateWallBox(
MeshObject* mesh,
const std::string &name,
const std::string &texture,
Real x1,
Real x2,
Real z1,
Real z2,
Real height_in,
Real voffset,
Real tw,
Real th,
bool inside =
true,
bool outside =
true,
bool top =
true,
bool bottom =
true,
bool autosize =
true);
212 Wall* CreateWallBox2(
MeshObject* mesh,
const std::string &name,
const std::string &texture,
Real CenterX,
Real CenterZ,
Real WidthX,
Real LengthZ,
Real height_in,
Real voffset,
Real tw,
Real th,
bool inside =
true,
bool outside =
true,
bool top =
true,
bool bottom =
true,
bool autosize =
true);
213 Wall* AddTriangleWall(
MeshObject* mesh,
const std::string &name,
const std::string &texture,
Real x1,
Real y1,
Real z1,
Real x2,
Real y2,
Real z2,
Real x3,
Real y3,
Real z3,
Real tw,
Real th);
215 Wall* AddCustomFloor(
MeshObject* mesh,
const std::string &name,
const std::string &texture, std::vector<Vector2> &varray,
Real altitude,
Real tw,
Real th);
217 void EnableBuildings(
bool value);
218 void EnableLandscape(
bool value);
219 void EnableExternal(
bool value);
220 void EnableSkybox(
bool value);
221 int GetFloorNumber(
Real altitude,
int lastfloor = 0,
bool checklastfloor =
false);
223 Shaft* CreateShaft(
int number,
Real CenterX,
Real CenterZ,
int startfloor,
int endfloor);
224 Stairwell* CreateStairwell(
int number,
Real CenterX,
Real CenterZ,
int startfloor,
int endfloor);
226 Floor* NewFloor(
int number);
227 Vehicle* NewVehicle(
int number);
229 int GetElevatorCount();
230 int GetTotalFloors();
232 int GetStairwellCount();
233 int GetVehicleCount();
234 int GetControllerCount();
235 Floor* GetFloor(
int number);
237 Shaft* GetShaft(
int number);
239 Vehicle* GetVehicle(
int number);
241 bool SetWallOrientation(std::string direction);
242 int GetWallOrientation();
243 bool SetFloorOrientation(std::string direction);
244 int GetFloorOrientation();
245 void DrawWalls(
bool MainN,
bool MainP,
bool SideN,
bool SideP,
bool Top,
bool Bottom);
246 void ResetWalls(
bool ToDefaults =
false);
247 int GetDrawWallsCount();
250 Wall* AddWall(
MeshObject* mesh,
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real height_in1,
Real height_in2,
Real altitude1,
Real altitude2,
Real tw,
Real th);
251 Wall* AddFloor(
MeshObject* mesh,
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real altitude1,
Real altitude2,
bool reverse_axis,
bool texture_direction,
Real tw,
Real th,
bool legacy_behavior =
false);
252 Wall* AddGround(
const std::string &name,
const std::string &texture,
Real x1,
Real z1,
Real x2,
Real z2,
Real altitude,
int tile_x,
int tile_z);
253 void EnableFloorRange(
int floor,
int range,
bool value,
bool enablegroups,
int shaftnumber = 0,
int stairsnumber = 0);
256 void ProcessTimers();
257 int GetTimerCallbackCount();
258 bool Mount(
const std::string &filename,
const std::string &path);
261 Sound* AddSound(
const std::string &name,
const std::string &filename,
const Vector3 &position,
bool loop =
true,
Real volume = 1.0,
int speed = 100,
Real min_distance = 1.0,
Real max_distance = -1.0,
Real doppler_level = 0.0,
Real cone_inside_angle = 360,
Real cone_outside_angle = 360,
Real cone_outside_volume = 1.0,
const Vector3 &direction =
Vector3(0, 0, 0));
263 void IncrementSoundCount();
264 void DecrementSoundCount();
265 Reverb* AddReverb(
const std::string &name,
const std::string &type,
const Vector3 &position,
Real min_distance,
Real max_distance);
266 int GetTotalReverbCount();
267 void IncrementReverbCount();
268 void DecrementReverbCount();
271 Vector3 ToLocal(
const Vector3& remote_value,
bool rescale =
true,
bool flip_z =
true);
274 Vector3 ToRemote(
const Vector3& local_value,
bool rescale =
true,
bool flip_z =
true);
275 int GetObjectCount();
276 Object* GetObject(
int number);
277 Object* GetObject(std::string name,
bool case_sensitive =
true);
278 Object* GetObjectOfParent(std::string parent_name, std::string name,
const std::string &type,
bool case_sensitive =
true);
279 std::vector<Object*> GetObjectRange(
const std::string &expression);
280 int RegisterObject(
Object *
object);
281 bool UnregisterObject(
int number);
282 bool IsValidFloor(
int floor);
283 std::string DumpState();
284 bool DeleteObject(
Object *
object);
285 bool DeleteObject(
int object);
286 void RemoveFloor(
Floor *floor);
287 void RemoveElevator(
Elevator *elevator);
288 void RemoveShaft(
Shaft *shaft);
290 void RemoveSound(
Sound *sound);
291 void RemoveReverb(
Reverb *reverb);
292 void RemoveLight(
Light *light);
293 void RemoveModel(
Model *model);
296 void RemoveControl(
Control *control);
297 void RemoveTrigger(
Trigger *trigger);
299 std::string VerifyFile(
const std::string &filename);
300 std::string VerifyFile(std::string filename,
bool &result,
bool skip_cache);
301 bool FileExists(
const std::string &filename);
303 int GetPolygonCount();
306 void Prepare(
bool report =
true,
bool renderonly =
false);
307 Light* AddLight(
const std::string &name,
int type);
308 MeshObject* FindMeshObject(
const std::string &name);
309 Model* AddModel(
const std::string &name,
const std::string &filename,
bool center,
const Vector3 &position,
const Vector3 &rotation,
Real max_render_distance = 0,
Real scale_multiplier = 1,
bool enable_physics =
false,
Real restitution = 0,
Real friction = 0,
Real mass = 0);
310 void AddModel(
Model *model);
311 Primitive* AddPrimitive(
const std::string &name);
315 int GetConfigInt(
const std::string &key,
int default_value);
316 std::string GetConfigString(
const std::string &key,
const std::string &default_value);
317 bool GetConfigBool(
const std::string &key,
bool default_value);
318 Real GetConfigFloat(
const std::string &key,
Real default_value);
321 unsigned long GetCurrentTime();
322 unsigned long GetRunTime();
323 unsigned long GetElapsedTime();
324 unsigned long GetAverageTime();
325 std::string GetMountPath(std::string filename, std::string &newfilename);
326 void ShowColliders(
bool value);
327 void CacheFilename(
const std::string &filename,
const std::string &result);
328 void SetLighting(
Real red = 1.0,
Real green = 1.0,
Real blue = 1.0);
329 void ResetLighting();
330 Control* AddControl(
const std::string &name,
const std::string &sound,
const std::string &direction,
Real CenterX,
Real CenterZ,
Real width,
Real height,
Real voffset,
int selection_position, std::vector<std::string> &action_names, std::vector<std::string> &textures);
331 Trigger* AddTrigger(
const std::string &name,
const std::string &sound_file,
const Vector3 &area_min,
const Vector3 &area_max, std::vector<std::string> &action_names);
332 Action* AddAction(
const std::string &name, std::vector<Object*> &action_parents,
const std::string &command,
const std::vector<std::string> ¶meters);
333 Action* AddAction(
const std::string &name, std::vector<Object*> &action_parents,
const std::string &command);
334 std::vector<Action*> GetAction(std::string name);
335 Action* GetAction(
int index);
336 int GetActionCount();
337 bool AddActionParent(
const std::string &name, std::vector<Object*> &parents);
338 bool RemoveActionParent(
const std::string &name, std::vector<Object*> &parents);
339 bool RemoveActionParent(std::vector<Object*> &parents);
340 bool RemoveAction(std::string name);
341 bool RemoveAction(
Action *action);
342 bool RunAction(
const std::string &name);
343 bool RunAction(
int index);
344 std::vector<Sound*> GetSound(
const std::string &name);
345 Reverb* GetReverb(
const std::string &name);
346 void AddKey(
int keyid,
const std::string &name);
347 bool CheckKey(
int keyid);
349 bool MoveObject(
Object *
object,
Vector3 position,
bool relative,
bool X,
bool Y,
bool Z);
350 bool RotateObject(
Object *
object,
Vector3 rotation,
Real speed,
bool relative,
bool X,
bool Y,
bool Z);
351 void RegisterControl(
Control *control);
352 void UnregisterControl(
Control *control);
353 void ShowFloorList();
354 void ShowSceneNodes(
bool value);
355 void ShowBoundingBoxes(
bool value);
356 void ListVisibleMeshes();
357 int GetEscalatorCount();
358 int GetMovingWalkwayCount();
360 void EnableRandomActivity(
bool value);
361 void EnableMalfunctions(
bool value);
363 bool IsObjectValid(
Object*
object, std::string type =
"");
364 bool IsActionValid(
Action* action);
365 std::vector<ElevatorRoute*> GetRouteToFloor(
int StartingFloor,
int DestinationFloor,
bool service_access =
false);
366 Person* CreatePerson(std::string name =
"",
int floor = 0,
bool service_access =
false);
367 void RemovePerson(
Person *person);
368 bool AttachCamera(std::vector<Ogre::Camera*> &cameras,
bool init_state =
true);
370 std::string ProcessFullName(std::string name,
int &instance,
int &object_number,
bool strip_number =
false);
371 int GetPersonCount();
372 Person* GetPerson(
int number);
375 bool IsInside(
const Vector3 &position);
376 void CutOutsideBoundaries(
bool landscape =
true,
bool buildings =
true,
bool external =
false,
bool floors =
false);
377 void CutInsideBoundaries(
const Vector3 &min,
const Vector3 &max,
bool landscape =
true,
bool buildings =
true,
bool external =
false,
bool floors =
false);
385 Light* GetLight(std::string name);
386 Model* GetModel(std::string name);
387 Primitive* GetPrimitive(std::string name);
402 int GetCameraTextureCount();
404 std::string GetFilesystemPath(std::string filename);
408 void RegisterEscalator(
Escalator *escalator);
409 void UnregisterEscalator(
Escalator *escalator);
414 void SetPower(
bool value);
416 Reverb* GetReverb(
int index);
417 int GetReverbCount();
418 void EnableMap(
bool value);
426 Real AmbientR, AmbientG,
AmbientB, OldAmbientR, OldAmbientG, OldAmbientB;
485 void CheckAutoAreas();
486 void CalculateAverageTime();
487 std::vector<ElevatorRoute*> GetIndirectRoute(std::vector<int> &checked_floors,
int StartingFloor,
int DestinationFloor,
bool service_access =
false,
bool top_level =
true);
488 ElevatorRoute* GetDirectRoute(
Floor *floor,
int DestinationFloor,
bool service_access =
false);