Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 6, 2010, 3:51:29 PM (14 years ago)
Author:
rgrieder
Message:

Added Doxygen documentation for ExprParser, MathConvert, OrxEnum, OrxAssert and TriBool.
Adjusted Doxygen documentation for Clock and Exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/util/Clock.h

    r7331 r7367  
    4141        via Clock& references (for instance for the game tick). <br>
    4242        Precision: <br>
     43    @par Precision
    4344        The maximum precision is given by the Ogre::Timer and that is somewhere
    4445        in the microsecond range for both Windows and UNIX.
    45     @remarks
     46    @par Remarks for Usage on Windows
    4647        For proper functionality this class MUST be used in the same thread! <br>
    47         Further more it might be possible that the Ogre::Timer has a performance
    48         caveat on Windows because it will only capture the time on the same
    49         CPU core. Confining the main thread to one process could speed up the game.
    50         See command line argument 'limitToCPU'.
     48        Furthermore it might be possible that the Ogre::Timer has a performance
     49        caveat because it will only capture the time on the same CPU core.
     50        Confining the main thread to one process could speed up the game.
     51        See \ref cmdargspage "Ccommandline Argument" 'limitToCPU' (only on Windows)
    5152    */
    5253    class _UtilExport Clock
    5354    {
    5455    public:
    55         //! Starts the time at 0
     56        /// Starts the time at 0
    5657        Clock();
    5758        ~Clock();
    5859
    59         //! Internally captures the time and stays at that particular time
     60        /** Internally captures the time and stays at that particular time
     61        @remarks
     62            Mind the types! Ogre::Timer::getMicroseconds() will return an unsigned
     63            long, which will eventually overflow. But if you use the subtraction of
     64            the current time minus the last time the timer gave us and sum these up to
     65            a 64 bit integer, we get the desired result. <br>
     66            Also mind that we don't have to store the last timer's time as unsigned long
     67            as well because (unsigned long)tickTime_ will do exactly that.
     68        */
    6069        void capture();
    6170
    62         //! Returns the last captured absolute time in microseconds
     71        /// Returns the last captured absolute time in microseconds
    6372        unsigned long long getMicroseconds() const
    6473            { return tickTime_; }
    65         //! Returns the last captured absolute time in milliseconds
     74        /// Returns the last captured absolute time in milliseconds
    6675        unsigned long long getMilliseconds() const
    6776            { return tickTime_ / 1000; }
    68         //! Returns the last captured absolute time in seconds
     77        /// Returns the last captured absolute time in seconds
    6978        unsigned long getSeconds() const
    7079            { return static_cast<long> (tickTime_ / 1000000); }
    71         //! Returns the last captured absolute time in seconds as float
     80        /// Returns the last captured absolute time in seconds as float
    7281        float getSecondsPrecise() const
    7382            { return static_cast<float>(tickTime_ / 1000000.0f); }
    7483
    75         //! Returns the timespan in seconds between the last two calls to capture()
     84        /// Returns the timespan in seconds between the last two calls to capture()
    7685        float getDeltaTime() const
    7786            { return tickDtFloat_; }
    78         //! Returns the timespan in microseconds between the last two calls to capture()
     87        /// Returns the timespan in microseconds between the last two calls to capture()
    7988        long getDeltaTimeMicroseconds() const
    8089            { return tickDt_; }
     
    8897
    8998    private:
    90         //! Undefined
     99        /// Undefined
    91100        Clock(const Clock& instance);
    92101
    93         Ogre::Timer*       timer_;       //!< Ogre timer object
    94         unsigned long long tickTime_;    //!< Currently captured time
    95         long               tickDt_;      //!< Delta time in microseconds (cache value)
    96         float              tickDtFloat_; //!< Delta time in seconds (cache value)
     102        Ogre::Timer*       timer_;       ///< Ogre timer object
     103        unsigned long long tickTime_;    ///< Currently captured time
     104        long               tickDt_;      ///< Delta time in microseconds (cache value)
     105        float              tickDtFloat_; ///< Delta time in seconds (cache value)
    97106    };
    98107}
Note: See TracChangeset for help on using the changeset viewer.