#[non_exhaustive]pub enum PolygonValidationError {
InvalidWorldBounds,
TooFewVertices {
obstacle_index: usize,
actual: usize,
},
DuplicateVertices {
obstacle_index: usize,
first_vertex_index: usize,
second_vertex_index: usize,
},
ZeroArea {
obstacle_index: usize,
},
VertexOutsideBounds {
obstacle_index: usize,
vertex_index: usize,
vertex: Point2,
},
SelfIntersection {
obstacle_index: usize,
first_edge_start_index: usize,
second_edge_start_index: usize,
},
ObstaclesOverlap {
left_index: usize,
right_index: usize,
},
EndpointNotTraversable {
endpoint: PolygonEndpoint,
point: Point2,
},
}Expand description
Static geometry or endpoint validation failure for polygonal scenes.
Variants describe invariants required before online search or prepared-map preprocess.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidWorldBounds
min is not strictly less than max on both axes (zero or negative area).
TooFewVertices
Obstacle ring has fewer than three vertices.
Fields
obstacle_index: usizeIndex into PolygonScene::obstacles.
DuplicateVertices
Two vertices of the same obstacle coincide within geometry epsilon.
Fields
obstacle_index: usizeIndex into PolygonScene::obstacles.
ZeroArea
Obstacle has near-zero signed area (degenerate ring).
Fields
obstacle_index: usizeIndex into PolygonScene::obstacles.
VertexOutsideBounds
Obstacle vertex lies outside the inclusive world rectangle.
Fields
obstacle_index: usizeIndex into PolygonScene::obstacles.
SelfIntersection
Non-adjacent edges of the same obstacle properly intersect.
Fields
obstacle_index: usizeIndex into PolygonScene::obstacles.
ObstaclesOverlap
Two obstacles share interior points, edge crossings, or nested vertices.
Fields
EndpointNotTraversable
Start, goal, or source is outside free space (including sealed boundary).
Fields
endpoint: PolygonEndpointWhich endpoint role failed traversability.
Trait Implementations§
Source§impl Clone for PolygonValidationError
impl Clone for PolygonValidationError
Source§fn clone(&self) -> PolygonValidationError
fn clone(&self) -> PolygonValidationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolygonValidationError
impl Debug for PolygonValidationError
Source§impl Display for PolygonValidationError
impl Display for PolygonValidationError
Source§impl Error for PolygonValidationError
impl Error for PolygonValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()