#[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()
Source§impl From<PolygonValidationError> for PolygonShortestPathMapBuildError
impl From<PolygonValidationError> for PolygonShortestPathMapBuildError
Source§fn from(source: PolygonValidationError) -> PolygonShortestPathMapBuildError
fn from(source: PolygonValidationError) -> PolygonShortestPathMapBuildError
Source§impl From<PolygonValidationError> for ArtifactDataError
impl From<PolygonValidationError> for ArtifactDataError
Source§fn from(source: PolygonValidationError) -> Self
fn from(source: PolygonValidationError) -> Self
Source§impl PartialEq for PolygonValidationError
impl PartialEq for PolygonValidationError
impl StructuralPartialEq for PolygonValidationError
Auto Trait Implementations§
impl Freeze for PolygonValidationError
impl RefUnwindSafe for PolygonValidationError
impl Send for PolygonValidationError
impl Sync for PolygonValidationError
impl Unpin for PolygonValidationError
impl UnsafeUnpin for PolygonValidationError
impl UnwindSafe for PolygonValidationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more