Check whether a point is inside the keepout zone, returning true if it is
| 110 | |
| 111 | // Check whether a point is inside the keepout zone, returning true if it is |
| 112 | bool KeepoutZone::IsPointInside(const GCodeBuffer &gb, const float *pointCoords) const noexcept |
| 113 | { |
| 114 | if (!active || axesChecked.IsEmpty()) |
| 115 | { |
| 116 | return false; |
| 117 | } |
| 118 | |
| 119 | bool inside = true; |
| 120 | axesChecked.IterateWhile([this, pointCoords, &outside](unsigned int axis, unsigned int)->bool |
| 121 | { |
| 122 | if (pointCoords[axis] <= coords[axis][0] || pointCoords[axis] >= coords[axis][1]) |
| 123 | { |
| 124 | inside = false; |
| 125 | }; |
| 126 | return inside; |
| 127 | }); |
| 128 | return inside; |
| 129 | } |
| 130 | |
| 131 | #endif |
| 132 |
nothing calls this directly
no test coverage detected