chull_adapt/common/config.rs
1// Copyright (C) 2020-2025 phys-convex-hull authors. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/// Represents the state of convex hull construction.
16#[derive(Debug, PartialEq, Copy, Clone)]
17pub enum ConvexHullConstructState {
18 /// Convex hull construction completed successfully.
19 Success,
20 /// Warning: Point count is less than four, which is insufficient for 3D convex hull.
21 PointCountLessThanFour,
22 /// Warning: The volume of the convex hull is too small.
23 VolumeTooSmall,
24 /// Warning: Point count exceeds the maximum allowed limit.
25 PointCountOverflow,
26 /// Warning: Face count limit has been reached.
27 FaceCountLimitHit,
28}
29
30/// Represents errors that can occur during convex hull construction.
31#[derive(Debug, PartialEq, Copy, Clone)]
32pub enum ConvexHullConstructError {
33 /// The input points are degenerate (e.g., collinear, coplanar, or coincident).
34 Degenerate,
35}