Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream' into 233-scrape-examples-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Jul 29, 2024
2 parents d7f01ac + a0bff1f commit 946f574
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- Rename `Shape::clone_box` to `Shape::clone_dyn` (the `clone_box` method still exists but has been
deprecated).
- Make `try_convex_hull` return an error instead of panicking if less than 3 input points are given.
- Make `Triangle::normal` and `Triangle::scaled_normal` only available in 3D insead of panicking in 2D.
- Make `Triangle::normal` and `Triangle::scaled_normal` only available in 3D instead of panicking in 2D.

## v0.16.1

Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
members = ["crates/parry2d", "crates/parry3d", "crates/parry2d-f64", "crates/parry3d-f64"]
resolver = "2"

[workspace.lints]
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("dim2", "dim3", "f32", "f64"))',
# "wavefront" is only used for 3D crates.
'cfg(feature, values("wavefront"))',
] }

[patch.crates-io]
parry2d = { path = "crates/parry2d" }
parry3d = { path = "crates/parry3d" }
Expand Down
5 changes: 5 additions & 0 deletions crates/parry2d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["required-features", "std"]
required-features = ["dim2", "f64"]
Expand Down Expand Up @@ -46,6 +49,8 @@ simd-stable = ["simba/wide", "simd-is-enabled"]
simd-nightly = ["simba/portable_simd", "simd-is-enabled"]
enhanced-determinism = ["simba/libm_force", "indexmap"]
parallel = ["rayon"]
alloc = []
improved_fixed_point_support = []

# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
Expand Down
5 changes: 5 additions & 0 deletions crates/parry2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["required-features", "std"]
required-features = ["dim2", "f32"]
Expand Down Expand Up @@ -46,6 +49,8 @@ simd-stable = ["simba/wide", "simd-is-enabled"]
simd-nightly = ["simba/portable_simd", "simd-is-enabled"]
enhanced-determinism = ["simba/libm_force", "indexmap"]
parallel = ["rayon"]
alloc = []
improved_fixed_point_support = []

# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
Expand Down
5 changes: 5 additions & 0 deletions crates/parry3d-f64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["required-features", "std"]
required-features = ["dim3", "f64"]
Expand All @@ -42,6 +45,8 @@ simd-nightly = ["simba/portable_simd", "simd-is-enabled"]
enhanced-determinism = ["simba/libm_force", "indexmap"]
parallel = ["rayon"]
wavefront = ["obj"]
alloc = []
improved_fixed_point_support = []

# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
Expand Down
7 changes: 7 additions & 0 deletions crates/parry3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ edition = "2021"
[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[features]
default = ["required-features", "std"]
required-features = ["dim3", "f32"]
Expand All @@ -42,6 +45,9 @@ simd-stable = ["simba/wide", "simd-is-enabled"]
simd-nightly = ["simba/portable_simd", "simd-is-enabled"]
enhanced-determinism = ["simba/libm_force", "indexmap"]
parallel = ["rayon"]
wavefront = ["obj"]
alloc = []
improved_fixed_point_support = []

# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
Expand Down Expand Up @@ -76,6 +82,7 @@ log = "0.4"
ordered-float = { version = "4", default-features = false }
thiserror = { version = "1", optional = true }
rstar = "0.12.0"
obj = { version = "0.10.2", optional = true }

[dev-dependencies]
oorandom = "11"
Expand Down
2 changes: 1 addition & 1 deletion src/bounding_volume/aabb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Aabb {
/// # Arguments:
/// * `mins` - position of the point with the smallest coordinates.
/// * `maxs` - position of the point with the highest coordinates. Each component of `mins`
/// must be smaller than the related components of `maxs`.
/// must be smaller than the related components of `maxs`.
#[inline]
pub fn new(mins: Point<Real>, maxs: Point<Real>) -> Aabb {
Aabb { mins, maxs }
Expand Down
8 changes: 4 additions & 4 deletions src/query/gjk/gjk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ pub fn project_origin<G: ?Sized + SupportMap>(
/// * simplex - the simplex to be used by the GJK algorithm. It must be already initialized
/// with at least one point on the shape boundary.
/// * exact_dist - if `false`, the gjk will stop as soon as it can prove that the origin is at
/// a distance smaller than `max_dist` but not inside of `shape`. In that case, it returns a
/// `GJKResult::Proximity(sep_axis)` where `sep_axis` is a separating axis. If `false` the gjk will
/// compute the exact distance and return `GJKResult::Projection(point)` if the origin is closer
/// than `max_dist` but not inside `shape`.
/// a distance smaller than `max_dist` but not inside of `shape`. In that case, it returns a
/// `GJKResult::Proximity(sep_axis)` where `sep_axis` is a separating axis. If `false` the gjk will
/// compute the exact distance and return `GJKResult::Projection(point)` if the origin is closer
/// than `max_dist` but not inside `shape`.
pub fn closest_points<G1, G2>(
pos12: &Isometry<Real>,
g1: &G1,
Expand Down
1 change: 1 addition & 0 deletions src/shape/polyline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ impl Polyline {
/// `num_indices == self.indices.len()`.
/// - This polyline is oriented counter-clockwise.
/// - In 3D, the polyline is assumed to be fully coplanar, on a plane with normal given by
///
/// These properties are not checked.
pub fn project_local_point_assuming_solid_interior_ccw(
&self,
Expand Down
2 changes: 2 additions & 0 deletions src/utils/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use indexmap::IndexMap as StdHashMap;
use std::collections::HashMap as StdHashMap;
use std::mem::size_of;

use std::mem::size_of;

/// Serializes only the capacity of a hash-map instead of its actual content.
#[cfg(feature = "serde-serialize")]
pub fn serialize_hashmap_capacity<S: serde::Serializer, K, V, H: std::hash::BuildHasher>(
Expand Down

0 comments on commit 946f574

Please sign in to comment.