#include <stdlib.h>#include <OgreMatrix3.h>#include <netinet/in.h>#include <arpa/inet.h>#include <boost/date_time/posix_time/posix_time.hpp>Go to the source code of this file.
| Functions | |
| float | clamp (float value, float lower, float upper) | 
| float | makeAnglePosNeg (float angle) | 
| float | differenceBetweenAngles (float angle1, float angle2) | 
| float | feet (float x) | 
| float | meters (float x) | 
| float | knots (float x) | 
| float | feetPerSecondSquared (float x) | 
| float | degreesPerSecond (float x) | 
| float | tons (float x) | 
| float | pounds (float x) | 
| int | randInt (int low, int high) | 
| ptime | getCurrentTime () | 
| Ogre::Radian | degrees (float d) | 
| float | toDegrees (float r) | 
| Ogre::Quaternion | pitchYawRoll (float p, float y, float r) | 
| std::string | trim (std::string s) | 
| std::string | int_to_string (const int &port) | 
| std::string | ip_int_to_string (const long &ipi) | 
| unsigned int | ip_string_to_int (const std::string &ips) | 
| Variables | |
| const float | pi = 3.14159 | 
| const float | twopi = 2.0 * pi | 
| float clamp | ( | float | value, | |
| float | lower, | |||
| float | upper | |||
| ) |  [inline] | 
Definition at line 19 of file utils.h.
Referenced by FastEcslent::Physics2D2::doHelmsman(), and FastEcslent::Physics2D1::doHelmsman().
| Ogre::Radian degrees | ( | float | d | ) |  [inline] | 
| float degreesPerSecond | ( | float | x | ) |  [inline] | 
Definition at line 56 of file utils.h.
Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().
| float differenceBetweenAngles | ( | float | angle1, | |
| float | angle2 | |||
| ) |  [inline] | 
Definition at line 38 of file utils.h.
References makeAnglePosNeg().
Referenced by FastEcslent::Physics2D1::doHelmsman().
| float feet | ( | float | x | ) |  [inline] | 
Definition at line 42 of file utils.h.
Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Refinery::Refinery(), FastEcslent::SupplyDepot::SupplyDepot(), and FastEcslent::Tank::Tank().
| float feetPerSecondSquared | ( | float | x | ) |  [inline] | 
Definition at line 52 of file utils.h.
Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().
| ptime getCurrentTime | ( | ) |  [inline] | 
Definition at line 74 of file utils.h.
Referenced by OgreGFX::LobbyMgr::addNode(), OgreGFX::LobbyMgr::addRemoteServer(), FastEcslent::NetCommon::getCurrentTimeLong(), FastEcslent::NetThread::getMyIP(), OgreGFX::LobbyMgr::handleJoinRequest(), FastEcslent::MilliSecondTimer::hasFired(), FastEcslent::NetThread::init(), FastEcslent::NetLobby::init(), OgreGFX::LobbyMgr::LobbyMgr(), FastEcslent::MilliSecondTimer::MilliSecondTimer(), FastEcslent::NetCommon::NetCommon(), OgreGFX::LobbyMgr::refreshServerAndSlots(), FastEcslent::Engine::run(), FastEcslent::NetThread::sendCommand(), and FastEcslent::NetThread::sendInfo().
| std::string int_to_string | ( | const int & | port | ) |  [inline] | 
Definition at line 99 of file utils.h.
Referenced by OgreGFX::LobbyMgr::getLobbyString(), and OgreGFX::LobbyMgr::initGUILobby().
| std::string ip_int_to_string | ( | const long & | ipi | ) |  [inline] | 
Definition at line 105 of file utils.h.
Referenced by FastEcslent::NetLobby::clientEnter(), FastEcslent::NetLobby::clientExit(), FastEcslent::NetLobby::clientSwap(), FastEcslent::NetLobby::joinRequest(), FastEcslent::NetLobby::serverExit(), FastEcslent::NetLobby::startByRemote(), and FastEcslent::NetLobby::updateLobbyServer().
| unsigned int ip_string_to_int | ( | const std::string & | ips | ) |  [inline] | 
Definition at line 112 of file utils.h.
Referenced by FastEcslent::NetLobby::fillLobbyClients(), FastEcslent::NetLobby::lobbyExitGame(), FastEcslent::NetLobby::lobbyJoinGame(), FastEcslent::NetLobby::lobbySlotSwapReq(), FastEcslent::NetLobby::lobbyStart(), and FastEcslent::NetLobby::sendLobbyClientResponse().
| float knots | ( | float | x | ) |  [inline] | 
Definition at line 49 of file utils.h.
Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Reaper::Reaper(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().
| float makeAnglePosNeg | ( | float | angle | ) |  [inline] | 
| float meters | ( | float | x | ) |  [inline] | 
Definition at line 45 of file utils.h.
Referenced by FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::SCVehicle::SCVehicle(), and FastEcslent::Thor::Thor().
| Ogre::Quaternion pitchYawRoll | ( | float | p, | |
| float | y, | |||
| float | r | |||
| ) |  [inline] | 
Definition at line 86 of file utils.h.
References degrees().
Referenced by FastEcslent::NetAspect::lerpRot().
| float pounds | ( | float | x | ) |  [inline] | 
Definition at line 63 of file utils.h.
Referenced by FastEcslent::Marine::Marine(), and FastEcslent::Reaper::Reaper().
| int randInt | ( | int | low, | |
| int | high | |||
| ) |  [inline] | 
| float toDegrees | ( | float | r | ) |  [inline] | 
Definition at line 82 of file utils.h.
References pi.
Referenced by FastEcslent::NetAspect::lerpRot().
| float tons | ( | float | x | ) |  [inline] | 
Definition at line 60 of file utils.h.
Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().
| std::string trim | ( | std::string | s | ) |  [inline] | 
Definition at line 94 of file utils.h.
Referenced by FastEcslent::NetLobby::joinRequest(), and FastEcslent::NetLobby::updateLobbyServer().
| const float pi = 3.14159 | 
Definition at line 16 of file utils.h.
Referenced by degrees(), makeAnglePosNeg(), toDegrees(), and FastEcslent::NetAspect::updateServer().
 1.5.4
 1.5.4