153 OgreBulletDynamics::DynamicsWorld *
mWorld;
201 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);
204 bool Start(std::vector<Ogre::Camera*> &cameras);
206 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,
bool report =
true);
207 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,
bool report =
true);
208 void CalculateFrameRate();
209 void Loop(
bool loading,
bool isready);
210 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,
bool report =
true);
211 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,
bool report =
true);
212 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);
214 Wall* AddCustomFloor(
MeshObject* mesh,
const std::string &name,
const std::string &texture, std::vector<Vector2> &varray,
Real altitude,
Real tw,
Real th);
215 void AddPolygon(
Wall* wallobject,
const std::string &texture,
PolyArray &varray,
Real tw,
Real th,
bool report =
true);
216 void EnableBuildings(
bool value);
217 void EnableLandscape(
bool value);
218 void EnableExternal(
bool value);
219 void EnableSkybox(
bool value);
220 int GetFloorNumber(
Real altitude,
int lastfloor = 0,
bool checklastfloor =
false);
222 Shaft* CreateShaft(
int number,
Real CenterX,
Real CenterZ,
int startfloor,
int endfloor);
223 Stairwell* CreateStairwell(
int number,
Real CenterX,
Real CenterZ,
int startfloor,
int endfloor);
225 Floor* NewFloor(
int number);
226 Vehicle* NewVehicle(
int number);
228 int GetElevatorCount();
229 int GetTotalFloors();
231 int GetStairwellCount();
232 int GetVehicleCount();
233 int GetControllerCount();
234 Floor* GetFloor(
int number);
236 Shaft* GetShaft(
int number);
238 Vehicle* GetVehicle(
int number);
240 bool SetWallOrientation(std::string direction);
241 int GetWallOrientation();
242 bool SetFloorOrientation(std::string direction);
243 int GetFloorOrientation();
244 void DrawWalls(
bool MainN,
bool MainP,
bool SideN,
bool SideP,
bool Top,
bool Bottom);
245 void ResetWalls(
bool ToDefaults =
false);
246 int GetDrawWallsCount();
249 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);
250 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);
251 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);
252 void EnableFloorRange(
int floor,
int range,
bool value,
bool enablegroups,
int shaftnumber = 0,
int stairsnumber = 0);
255 void ProcessTimers();
256 int GetTimerCallbackCount();
257 bool Mount(
const std::string &filename,
const std::string &path);
260 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));
262 void IncrementSoundCount();
263 void DecrementSoundCount();
264 Reverb* AddReverb(
const std::string &name,
const std::string &type,
const Vector3 &position,
Real min_distance,
Real max_distance);
265 int GetTotalReverbCount();
266 void IncrementReverbCount();
267 void DecrementReverbCount();
270 Vector3 ToLocal(
const Vector3& remote_value,
bool rescale =
true,
bool flip_z =
true);
273 Vector3 ToRemote(
const Vector3& local_value,
bool rescale =
true,
bool flip_z =
true);
274 int GetObjectCount();
275 Object* GetObject(
int number);
276 Object* GetObject(std::string name,
bool case_sensitive =
true);
277 Object* GetObjectOfParent(std::string parent_name, std::string name,
const std::string &type,
bool case_sensitive =
true);
278 std::vector<Object*> GetObjectRange(
const std::string &expression);
279 int RegisterObject(
Object *
object);
280 bool UnregisterObject(
int number);
281 bool IsValidFloor(
int floor);
282 std::string DumpState();
283 bool DeleteObject(
Object *
object);
284 bool DeleteObject(
int object);
285 void RemoveFloor(
Floor *floor);
286 void RemoveElevator(
Elevator *elevator);
287 void RemoveShaft(
Shaft *shaft);
289 void RemoveSound(
Sound *sound);
290 void RemoveReverb(
Reverb *reverb);
291 void RemoveLight(
Light *light);
292 void RemoveModel(
Model *model);
295 void RemoveControl(
Control *control);
296 void RemoveTrigger(
Trigger *trigger);
298 std::string VerifyFile(
const std::string &filename);
299 std::string VerifyFile(std::string filename,
bool &result,
bool skip_cache);
300 bool FileExists(
const std::string &filename);
302 int GetPolygonCount();
305 void Prepare(
bool report =
true,
bool renderonly =
false);
306 Light* AddLight(
const std::string &name,
int type);
307 MeshObject* FindMeshObject(
const std::string &name);
308 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);
309 void AddModel(
Model *model);
310 Primitive* AddPrimitive(
const std::string &name);
314 int GetConfigInt(
const std::string &key,
int default_value);
315 std::string GetConfigString(
const std::string &key,
const std::string &default_value);
316 bool GetConfigBool(
const std::string &key,
bool default_value);
317 Real GetConfigFloat(
const std::string &key,
Real default_value);
320 unsigned long GetCurrentTime();
321 unsigned long GetRunTime();
322 unsigned long GetElapsedTime();
323 unsigned long GetAverageTime();
324 std::string GetMountPath(std::string filename, std::string &newfilename);
325 void ShowColliders(
bool value);
326 void CacheFilename(
const std::string &filename,
const std::string &result);
327 void SetLighting(
Real red = 1.0,
Real green = 1.0,
Real blue = 1.0);
328 void ResetLighting();
329 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);
330 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);
331 Action* AddAction(
const std::string &name, std::vector<Object*> &action_parents,
const std::string &command,
const std::vector<std::string> ¶meters);
332 Action* AddAction(
const std::string &name, std::vector<Object*> &action_parents,
const std::string &command);
333 std::vector<Action*> GetAction(std::string name);
334 Action* GetAction(
int index);
335 int GetActionCount();
336 bool AddActionParent(
const std::string &name, std::vector<Object*> &parents);
337 bool RemoveActionParent(
const std::string &name, std::vector<Object*> &parents);
338 bool RemoveActionParent(std::vector<Object*> &parents);
339 bool RemoveAction(std::string name);
340 bool RemoveAction(
Action *action);
341 bool RunAction(
const std::string &name);
342 bool RunAction(
int index);
343 std::vector<Sound*> GetSound(
const std::string &name);
344 Reverb* GetReverb(
const std::string &name);
345 void AddKey(
int keyid,
const std::string &name);
346 bool CheckKey(
int keyid);
348 bool MoveObject(
Object *
object,
Vector3 position,
bool relative,
bool X,
bool Y,
bool Z);
349 bool RotateObject(
Object *
object,
Vector3 rotation,
Real speed,
bool relative,
bool X,
bool Y,
bool Z);
350 void RegisterControl(
Control *control);
351 void UnregisterControl(
Control *control);
352 void ShowFloorList();
353 void ShowSceneNodes(
bool value);
354 void ShowBoundingBoxes(
bool value);
355 void ListVisibleMeshes();
356 int GetEscalatorCount();
357 int GetMovingWalkwayCount();
359 void EnableRandomActivity(
bool value);
360 void EnableMalfunctions(
bool value);
362 bool IsObjectValid(
Object*
object, std::string type =
"");
363 bool IsActionValid(
Action* action);
364 std::vector<ElevatorRoute*> GetRouteToFloor(
int StartingFloor,
int DestinationFloor,
bool service_access =
false);
365 Person* CreatePerson(std::string name =
"",
int floor = 0,
bool service_access =
false);
366 void RemovePerson(
Person *person);
367 bool AttachCamera(std::vector<Ogre::Camera*> &cameras,
bool init_state =
true);
369 std::string ProcessFullName(std::string name,
int &instance,
int &object_number,
bool strip_number =
false);
370 int GetPersonCount();
371 Person* GetPerson(
int number);
374 bool IsInside(
const Vector3 &position);
375 void CutOutsideBoundaries(
bool landscape =
true,
bool buildings =
true,
bool external =
false,
bool floors =
false);
376 void CutInsideBoundaries(
const Vector3 &min,
const Vector3 &max,
bool landscape =
true,
bool buildings =
true,
bool external =
false,
bool floors =
false);
384 Light* GetLight(std::string name);
385 Model* GetModel(std::string name);
386 Primitive* GetPrimitive(std::string name);
401 int GetCameraTextureCount();
403 std::string GetFilesystemPath(std::string filename);
407 void RegisterEscalator(
Escalator *escalator);
408 void UnregisterEscalator(
Escalator *escalator);
413 void SetPower(
bool value);
415 Reverb* GetReverb(
int index);
416 int GetReverbCount();
417 void EnableMap(
bool value);
418 int GetTextureCount();
428 Real AmbientR, AmbientG,
AmbientB, OldAmbientR, OldAmbientG, OldAmbientB;
487 void CheckAutoAreas();
488 void CalculateAverageTime();
489 std::vector<ElevatorRoute*> GetIndirectRoute(std::vector<int> &checked_floors,
int StartingFloor,
int DestinationFloor,
bool service_access =
false,
bool top_level =
true);
490 ElevatorRoute* GetDirectRoute(
Floor *floor,
int DestinationFloor,
bool service_access =
false);