Changeset 223 in flair-src for trunk/lib/FlairCore
- Timestamp:
- Feb 27, 2018, 12:20:03 PM (7 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/io_data.cpp
r51 r223 46 46 void io_data::SetDataTime(Time time) { 47 47 GetMutex(); 48 if(pimpl_->time!=TIME_INFINITE) pimpl_->deltaTime = time-pimpl_->time; 49 pimpl_->time = time; 50 ReleaseMutex(); 51 } 52 53 void io_data::SetDataTime(Time time,Time deltaTime) { 54 GetMutex(); 55 pimpl_->deltaTime = deltaTime; 48 56 pimpl_->time = time; 49 57 ReleaseMutex(); … … 56 64 ReleaseMutex(); 57 65 return tmp; 66 } 67 68 Time io_data::DataDeltaTime(void) const { 69 Time tmp; 70 GetMutex(); 71 tmp = pimpl_->deltaTime; 72 ReleaseMutex(); 73 return tmp; 74 } 75 76 void io_data::GetDataTime(Time &time,Time &deltaTime) const{ 77 GetMutex(); 78 deltaTime=pimpl_->deltaTime ; 79 time=pimpl_->time ; 80 ReleaseMutex(); 58 81 } 59 82 -
trunk/lib/FlairCore/src/io_data.h
r51 r223 116 116 117 117 /*! 118 * \brief Set data time 119 * 118 * \brief Set data time, also caluculates the delta time based on last call 119 * 120 * TIME_INFINITE represents an unitialized time 121 * 120 122 * \param time time 121 123 */ 122 124 void SetDataTime(Time time); 125 126 /*! 127 * \brief Set data time and delta time (thus delta time is not based on last call) 128 * 129 * TIME_INFINITE represents an unitialized time 130 * 131 * \param time time 132 * \param deltaTime delta time 133 */ 134 void SetDataTime(Time time,Time deltaTime); 123 135 124 136 /*! 125 137 * \brief Data time 126 138 * 139 * TIME_INFINITE represents an unitialized time. 140 * 127 141 * \return data time 128 142 */ 129 143 Time DataTime(void) const; 144 145 /*! 146 * \brief Data delta time 147 * 148 * TIME_INFINITE represents an unitialized time. 149 * 150 * \return data delta time 151 */ 152 Time DataDeltaTime(void) const; 153 154 /*! 155 * \brief Get data time and delta time 156 * 157 * TIME_INFINITE represents an unitialized time 158 * 159 * \param time time 160 * \param deltaTime delta time 161 */ 162 void GetDataTime(Time &time,Time &deltaTime) const; 130 163 131 164 /*! -
trunk/lib/FlairCore/src/io_data_impl.cpp
r122 r223 31 31 is_consistent = false; 32 32 circle_ptr = NULL; 33 deltaTime=TIME_INFINITE;//init 34 time=TIME_INFINITE;//init 33 35 } 34 36 -
trunk/lib/FlairCore/src/unexported/io_data_impl.h
r15 r223 37 37 flair::core::DataType const &datatype); 38 38 size_t size; 39 flair::core::Time time ;39 flair::core::Time time,deltaTime; 40 40 void **circle_ptr; 41 41
Note:
See TracChangeset
for help on using the changeset viewer.