| 250 | } |
| 251 | |
| 252 | int CircleSequencerRing::GetStepIndex(int x, int y, float& radiusOut) |
| 253 | { |
| 254 | ofVec2f polar = CarToPol(x - 100, y - 100); |
| 255 | float pos = FloatWrap(polar.x + mOffset, 1); |
| 256 | int idx = int(pos * mLength + .5f) % mLength; |
| 257 | |
| 258 | ofVec2f stepPos = PolToCar(float(idx) / mLength - mOffset, GetRadius()); |
| 259 | if (ofDistSquared(x, y, stepPos.x + 100, stepPos.y + 100) < 7 * 7) |
| 260 | { |
| 261 | radiusOut = polar.y; |
| 262 | return idx; |
| 263 | } |
| 264 | |
| 265 | return -1; |
| 266 | } |
| 267 | |
| 268 | void CircleSequencerRing::OnClicked(float x, float y, bool right) |
| 269 | { |
nothing calls this directly
no test coverage detected