MCPcopy Create free account
hub / github.com/MyGUI/mygui / addTime

Method addTime

UnitTests/UnitTest_TextureAnimations/WobbleNodeAnimator.cpp:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 void WobbleNodeAnimator::addTime(float _time)
126 {
127 const float speed = 4;
128 _time = std::min(0.05f, _time);
129
130 MyGUI::FloatPoint previousdrag = mDragOffset;
131
132 mDragOffset.left = mDragOffset.left + mInertia.left * 5.0f * speed * _time;
133 mDragOffset.top = mDragOffset.top + mInertia.top * 5.0f * speed * _time;
134
135 mInertia.left += (mInertia.left * -5 * speed * _time);
136 mInertia.left += (previousdrag.left * -4.0f * speed * _time);
137
138 mInertia.top += (mInertia.top * -5 * speed * _time);
139 mInertia.top += (previousdrag.top * -4.0f * speed * _time);
140 }
141
142 void WobbleNodeAnimator::buildQuadVertex(MyGUI::VectorQuadData& _data)
143 {

Callers

nothing calls this directly

Calls 1

minFunction · 0.85

Tested by

no test coverage detected