Definition at line 171 of file 3DSlide.cpp.
◆ isAnimating()
bool RotateAnimator::isAnimating |
( |
| ) |
const |
|
inline |
Definition at line 231 of file 3DSlide.cpp.
231{ return fAngleSpeed != 0; }
◆ reset()
void RotateAnimator::reset |
( |
| ) |
|
|
inline |
Definition at line 225 of file 3DSlide.cpp.
225 {
226 fAngleSpeed = 0;
227 fAngle = 0;
228 fPrevAngle = 1234567;
229 }
◆ rotation()
SkM44 RotateAnimator::rotation |
( |
| ) |
|
|
inline |
Definition at line 197 of file 3DSlide.cpp.
197 {
198 if (fAngleSpeed > 0) {
200 double dtime = now - fPrevNow;
201 fPrevNow = now;
202 double delta = fAngleSign * fAngleSpeed * dtime;
204 fAngleSpeed -= kSlowDown * dtime;
205 if (fAngleSpeed < 0) {
206 fAngleSpeed = 0;
207 }
208 }
210
211 }
static SkM44 Rotate(SkV3 axis, SkScalar radians)
◆ start()
void RotateAnimator::start |
( |
| ) |
|
|
inline |
Definition at line 213 of file 3DSlide.cpp.
213 {
214 if (fPrevNow != fNow) {
215 fAngleSpeed = (fAngle - fPrevAngle) / (fNow - fPrevNow);
216 fAngleSign = fAngleSpeed < 0 ? -1 : 1;
218 } else {
219 fAngleSpeed = 0;
220 }
222 fAngle = 0;
223 }
static float min(float r, float g, float b)
SIN Vec< N, float > abs(const Vec< N, float > &x)
◆ update()
Definition at line 185 of file 3DSlide.cpp.
185 {
186 if (angle != fPrevAngle) {
187 fPrevAngle = fAngle;
188 fAngle = angle;
189
190 fPrevNow = fNow;
192
193 fAxis = axis;
194 }
195 }
The documentation for this class was generated from the following file: