Changeset 11099 for code/trunk/src/libraries
- Timestamp:
- Jan 27, 2016, 6:50:51 PM (9 years ago)
- Location:
- code/trunk/src/libraries
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/CoreIncludes.h
r11071 r11099 125 125 @brief Registers the class in the framework with a given Factory. 126 126 @param ClassName The name of the class 127 @param FactoryInstance An instance of a factory that can create the class 128 @param bLoadable Whether the class is allowed to be loaded through XML 127 129 */ 128 130 #define RegisterClassWithFactory(ClassName, FactoryInstance, bLoadable) \ … … 201 203 @note This of course only works with Identifiables. 202 204 The only use is in conjunction with macros that don't know the class type. 203 @param objectPointer to an Identifiable205 @param p Pointer to an Identifiable 204 206 */ 205 207 template <class T> 206 inline Identifier* ClassByObjectType(const T* )208 inline Identifier* ClassByObjectType(const T* p) 207 209 { 208 210 return ClassIdentifier<T>::getIdentifier(); -
code/trunk/src/libraries/core/GUIManager.cc
r11083 r11099 793 793 } 794 794 795 /** Executes a CEGUI function normally, but catches CEGUI::ScriptException. 795 /** 796 @copydoc protectedCeguiSystemCall 797 @param function 798 Any callable object/function that takes one parameter. 799 @param object 800 Object to be used as an argument for the @p function 801 @return 802 True if input was handled, false otherwise. A caught exception yields true. 803 */ 804 template <typename FunctionType, typename ObjectType> 805 bool GUIManager::protectedCall(FunctionType function, ObjectType object) 806 { 807 try 808 { 809 return function(object); 810 } 811 catch (CEGUI::ScriptException& ex) 812 { 813 // Display the error and proceed. See @remarks why this can be dangerous. 814 orxout(internal_error) << ex.getMessage() << endl; 815 return true; 816 } 817 } 818 819 /** 820 Executes a CEGUI function normally, but catches CEGUI::ScriptException. 796 821 When a ScriptException occurs, the error message will be displayed and 797 822 the program carries on. … … 808 833 True if input was handled, false otherwise. A caught exception yields true. 809 834 */ 810 template <typename FunctionType, typename ObjectType>811 bool GUIManager::protectedCall(FunctionType function, ObjectType object)812 {813 try814 {815 return function(object);816 }817 catch (CEGUI::ScriptException& ex)818 {819 // Display the error and proceed. See @remarks why this can be dangerous.820 orxout(internal_error) << ex.getMessage() << endl;821 return true;822 }823 }824 825 835 template <typename FunctionType> 826 836 bool GUIManager::protectedCeguiSystemCall(FunctionType function) -
code/trunk/src/libraries/core/class/IdentifierManager.cc
r11071 r11099 255 255 /** 256 256 @brief Returns the Identifier with a given typeid-name. 257 @param name The typeid-nameof the wanted Identifier257 @param typeInfo The type_info of the wanted Identifier 258 258 @return The Identifier 259 259 */ -
code/trunk/src/libraries/core/command/CommandExecutor.cc
r11071 r11099 67 67 @param command A string containing the command 68 68 @param useTcl If true, the command is passed to tcl (see TclBind) 69 @param printErrors If true, print an error when command failed 69 70 @return Returns the error-code (see @ref CommandExecutorErrorCodes "error codes") 70 71 */ -
code/trunk/src/libraries/core/command/ConsoleCommandCompilation.cc
r10624 r11099 100 100 @brief Prints text to the console. 101 101 @param level_name The name of the output level 102 @param text The text to print 102 103 */ 103 104 void orxout_level(const std::string& level_name, const std::string& text) … … 119 120 @param level_name The name of the output level 120 121 @param context_name The name of the output context 122 @param text The text to print 121 123 */ 122 124 void orxout_level_context(const std::string& level_name, const std::string& context_name, const std::string& text) -
code/trunk/src/libraries/core/commandline/CommandLineIncludes.h
r11071 r11099 30 30 @defgroup CmdArgs Commandline arguments 31 31 @ingroup Config 32 @brief For a reference of all commandline arguments see @ref cmdargspage33 32 */ 34 33 -
code/trunk/src/libraries/core/commandline/CommandLineParser.cc
r11071 r11099 218 218 @param value 219 219 String containing the value 220 @param bParsingFile221 Parsing a file or the command line itself222 220 */ 223 221 void CommandLineParser::checkFullArgument(const std::string& name, const std::string& value) … … 237 235 @param value 238 236 String containing the value 239 @param bParsingFile240 Parsing a file or the command line itself241 237 */ 242 238 void CommandLineParser::checkShortcut(const std::string& shortcut, const std::string& value) -
code/trunk/src/libraries/core/commandline/CommandLineParser.h
r11071 r11099 26 26 * 27 27 */ 28 29 /**30 @defgroup CmdArgs Commandline arguments31 @ingroup Config32 @brief For a reference of all commandline arguments see @ref cmdargspage33 */34 28 35 29 /** -
code/trunk/src/libraries/core/config/ConfigValueContainer.h
r11071 r11099 109 109 */ 110 110 template <class D, class V> 111 ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& )111 ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const D& defvalue, const V& value) 112 112 { 113 113 this->init(type, identifier, sectionname, varname); … … 125 125 */ 126 126 template <class D, class V> 127 ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& )127 ConfigValueContainer(ConfigFileType::Value type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value) 128 128 { 129 129 this->init(type, identifier, sectionname, varname); -
code/trunk/src/libraries/core/object/IteratorBase.h
r11071 r11099 173 173 /** 174 174 @brief Increments the Iterator if it points at the given element. 175 @param object The object to compare with175 @param element The element to compare with 176 176 */ 177 177 virtual void removedElement(ObjectListBaseElement* element) override -
code/trunk/src/libraries/core/object/ObjectListBase.h
r11071 r11099 55 55 /** 56 56 @brief Constructor: Creates the list-element with an object. 57 @param object BaseThe object to store57 @param object The object to store 58 58 */ 59 59 ObjectListBaseElement(Listable* object) : next_(nullptr), prev_(nullptr), objectBase_(object), list_(nullptr) {} -
code/trunk/src/libraries/network/MasterServerComm.h
r8858 r11099 88 88 int sendRequest( std::string data ); 89 89 90 /** \param callback The callback functionto call with data received.90 /** \param listener The listener to call with data received. 91 91 * \param delayms Delay in milliseconds. 92 92 * \return 0 for success, other for error -
code/trunk/src/libraries/network/ServerList.h
r10622 r11099 74 74 /* BASIC MANIPULATION */ 75 75 /** \param toadd the server to add. 76 * \param peer the peer 76 77 * 77 78 * Add server to the game server list -
code/trunk/src/libraries/tools/BulletDebugDrawer.cc
r10277 r11099 1 1 /** 2 * @file BulletDebugDrawer.cc 2 3 * Originally from http://www.ogre3d.org/tikiwiki/BulletDebugDrawer&structure=Cookbook 3 4 * This source code is released into the Public Domain. -
code/trunk/src/libraries/tools/BulletDebugDrawer.h
r11071 r11099 1 /**2 * Originally from http://www.ogre3d.org/tikiwiki/BulletDebugDrawer&structure=Cookbook3 * This source code is released into the Public Domain.4 *5 * Modified by Fabian 'x3n' Landau by using DebugDrawer and Orxonox specific utilities (e.g. output).6 */7 8 1 #ifndef _BulletDebugDrawer_H__ 9 2 #define _BulletDebugDrawer_H__ … … 18 11 namespace orxonox 19 12 { 13 /** 14 * Originally from http://www.ogre3d.org/tikiwiki/BulletDebugDrawer&structure=Cookbook 15 * This source code is released into the Public Domain. 16 * 17 * Modified by Fabian 'x3n' Landau by using DebugDrawer and Orxonox specific utilities (e.g. output). 18 */ 20 19 class _ToolsExport BulletDebugDrawer : public btIDebugDraw, public Ogre::FrameListener 21 20 { -
code/trunk/src/libraries/tools/DebugDrawer.cc
r11071 r11099 1 1 /** 2 * @file DebugDrawer.cc 2 3 * Copy-pasted from 3 4 * - https://bitbucket.org/hasyimi/ogre-debug-drawing-utility/src -
code/trunk/src/libraries/tools/DebugDrawer.h
r10262 r11099 1 1 /** 2 * @file DebugDrawer.h 2 3 * Copy-pasted from 3 4 * - https://bitbucket.org/hasyimi/ogre-debug-drawing-utility/src … … 9 10 */ 10 11 11 /** 12 * @file 13 * @brief DebugDrawer is a utility to draw debug shapes (lines, triangles, spheres) with Ogre. 14 * This utility is e.g. used by @ref BulletDebugDrawer to visualize collision shapes and other physical entities. 15 */ 12 16 13 17 14 #ifndef _DebugDrawer_H__ … … 26 23 namespace orxonox 27 24 { 25 /** 26 * @brief DebugDrawer is a utility to draw debug shapes (lines, triangles, spheres) with Ogre. 27 * This utility is e.g. used by @ref orxonox::BulletDebugDrawer to visualize collision shapes and other physical entities. 28 */ 28 29 class _ToolsExport DebugDrawer 29 30 { -
code/trunk/src/libraries/tools/IcoSphere.cc
r11071 r11099 1 1 /** 2 * @file IcoSphere.cc 2 3 * Copy-pasted from 3 4 * - https://bitbucket.org/hasyimi/ogre-debug-drawing-utility/src -
code/trunk/src/libraries/tools/IcoSphere.h
r10262 r11099 1 /**2 * Copy-pasted from3 * - https://bitbucket.org/hasyimi/ogre-debug-drawing-utility/src4 * - http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Debug+Drawing+Utility+Class5 *6 * This source code is released into the Public Domain.7 *8 * Modified by Fabian 'x3n' Landau9 */10 1 11 /**12 * @file13 * @brief DebugDrawer is a utility to draw debug shapes (lines, triangles, spheres) with Ogre.14 * This utility is e.g. used by @ref BulletDebugDrawer to visualize collision shapes and other physical entities.15 */16 2 17 3 #ifndef _IcoSphere_H__ … … 27 13 typedef std::pair<Ogre::Vector3, Ogre::ColourValue> VertexPair; 28 14 15 /** 16 * Copy-pasted from 17 * - https://bitbucket.org/hasyimi/ogre-debug-drawing-utility/src 18 * - http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Debug+Drawing+Utility+Class 19 * 20 * This source code is released into the Public Domain. 21 * 22 * Modified by Fabian 'x3n' Landau 23 */ 29 24 class _ToolsExport IcoSphere 30 25 { -
code/trunk/src/libraries/tools/OgreBulletUtils.h
r11071 r11099 1 1 /** 2 * @file OgreBulletUtils.h 2 3 * Copy-pasted from http://www.ogre3d.org/tikiwiki/BulletDebugDrawer&structure=Cookbook 3 4 * This source code is released into the Public Domain. -
code/trunk/src/libraries/util/Clock.h
r11071 r11099 54 54 caveat because it will only capture the time on the same CPU core. 55 55 Confining the main thread to one process could speed up the game. 56 See \ref cmdargspage "Ccommandline Argument" 'limitToCPU' (only on Windows)57 56 */ 58 57 class _UtilExport Clock -
code/trunk/src/libraries/util/Math.cc
r11071 r11099 291 291 /** 292 292 @brief Gets the new vector after a coordinate transformation 293 @param distanceVector which will be transformed294 @param mydirectionNew x basevector295 @param myorthonormalNew y basevector296 @param otherpositionNew z basevector297 @return directionin the new coordinates293 @param totransform Vector which will be transformed 294 @param newx New x basevector 295 @param newy New y basevector 296 @param newz New z basevector 297 @return Vector in the new coordinates 298 298 299 299 x is vector in old coordinates … … 307 307 y = T^(-1)*x 308 308 */ 309 orxonox::Vector3 getTransformedVector(const orxonox::Vector3& distance, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& myside)309 orxonox::Vector3 getTransformedVector(const orxonox::Vector3& totransform, const orxonox::Vector3& newx, const orxonox::Vector3& newy, const orxonox::Vector3& newz) 310 310 { 311 311 // inverse of the transform matrix 312 float determinant = + mydirection.x * (myorthonormal.y*myside.z - myside.y*myorthonormal.z)313 - mydirection.y * (myorthonormal.x*myside.z - myorthonormal.z*myside.x)314 + mydirection.z * (myorthonormal.x*myside.y - myorthonormal.y*myside.x);312 float determinant = +newx.x * (newy.y*newz.z - newz.y*newy.z) 313 -newx.y * (newy.x*newz.z - newy.z*newz.x) 314 +newx.z * (newy.x*newz.y - newy.y*newz.x); 315 315 float invdet = 1/determinant; 316 316 … … 320 320 orxonox::Vector3 zinvtransform; 321 321 322 xinvtransform.x = ( myorthonormal.y * myside.z - myside.y * myorthonormal.z)*invdet;323 xinvtransform.y = ( mydirection.z * myside.y - mydirection.y * myside.z )*invdet;324 xinvtransform.z = ( mydirection.y * myorthonormal.z - mydirection.z * myorthonormal.y)*invdet;325 yinvtransform.x = ( myorthonormal.z * myside.x - myorthonormal.x * myside.z )*invdet;326 yinvtransform.y = ( mydirection.x * myside.z - mydirection.z * myside.x )*invdet;327 yinvtransform.z = ( myorthonormal.x * mydirection.z - mydirection.x * myorthonormal.z)*invdet;328 zinvtransform.x = ( myorthonormal.x * myside.y - myside.x * myorthonormal.y)*invdet;329 zinvtransform.y = ( myside.x * mydirection.y - mydirection.x * myside.y )*invdet;330 zinvtransform.z = ( mydirection.x * myorthonormal.y - myorthonormal.x * mydirection.y )*invdet;322 xinvtransform.x = (newy.y * newz.z - newz.y * newy.z)*invdet; 323 xinvtransform.y = (newx.z * newz.y - newx.y * newz.z )*invdet; 324 xinvtransform.z = (newx.y * newy.z - newx.z * newy.y)*invdet; 325 yinvtransform.x = (newy.z * newz.x - newy.x * newz.z )*invdet; 326 yinvtransform.y = (newx.x * newz.z - newx.z * newz.x )*invdet; 327 yinvtransform.z = (newy.x * newx.z - newx.x * newy.z)*invdet; 328 zinvtransform.x = (newy.x * newz.y - newz.x * newy.y)*invdet; 329 zinvtransform.y = (newz.x * newx.y - newx.x * newz.y )*invdet; 330 zinvtransform.z = (newx.x * newy.y - newy.x * newx.y )*invdet; 331 331 332 332 // coordinate transformation 333 333 orxonox::Vector3 distanceShip; 334 distanceShip.x = xinvtransform.x * distance.x + yinvtransform.x * distance.y + zinvtransform.x * distance.z;335 distanceShip.y = xinvtransform.y * distance.x + yinvtransform.y * distance.y + zinvtransform.y * distance.z;336 distanceShip.z = xinvtransform.z * distance.x + yinvtransform.z * distance.y + zinvtransform.z * distance.z;334 distanceShip.x = xinvtransform.x * totransform.x + yinvtransform.x * totransform.y + zinvtransform.x * totransform.z; 335 distanceShip.y = xinvtransform.y * totransform.x + yinvtransform.y * totransform.y + zinvtransform.y * totransform.z; 336 distanceShip.z = xinvtransform.z * totransform.x + yinvtransform.z * totransform.y + zinvtransform.z * totransform.z; 337 337 338 338 return distanceShip;
Note: See TracChangeset
for help on using the changeset viewer.