| 39 | } |
| 40 | |
| 41 | Vector2 CrosshairData::GetPositionOffset(short orientOffset) const |
| 42 | { |
| 43 | constexpr auto ANGLE_OFFSET = ANGLE(-360.0f / (SEGMENT_COUNT * 2)); |
| 44 | |
| 45 | float offsetDist = GetRadius(); |
| 46 | auto relPosOffset = Vector2(offsetDist, 0.0f); |
| 47 | auto rotMatrix = Matrix::CreateRotationZ(TO_RAD((Orientation + orientOffset) + ANGLE_OFFSET)); |
| 48 | |
| 49 | auto posOffset = Vector2::Transform(relPosOffset, rotMatrix); |
| 50 | return GetAspectCorrect2DPosition(posOffset); |
| 51 | } |
| 52 | |
| 53 | void CrosshairData::SetPrimary() |
| 54 | { |
no test coverage detected