diff options
| author | Robert Hrusecky <robert.hrusecky@utexas.edu> | 2020-10-29 18:09:41 -0500 |
|---|---|---|
| committer | Robert Hrusecky <robert.hrusecky@utexas.edu> | 2020-10-29 18:09:41 -0500 |
| commit | bcec54ef31d987cf20b493628a20777183a95f65 (patch) | |
| tree | cee40c0467c04f1f02861342e20ce8223ca6d99b | |
| parent | dd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f (diff) | |
| parent | 4b8242b9c267a9412c88793575db37f79c544ca2 (diff) | |
| download | rapier-bcec54ef31d987cf20b493628a20777183a95f65.tar.gz rapier-bcec54ef31d987cf20b493628a20777183a95f65.tar.bz2 rapier-bcec54ef31d987cf20b493628a20777183a95f65.zip | |
Merge branch 'master' into infinite_fall_memory
Fix merge conflict resulting from "axii" spelling correction
76 files changed, 2758 insertions, 821 deletions
diff --git a/.github/workflows/rapier-ci-bench.yml b/.github/workflows/rapier-ci-bench.yml index 9cce1b2..6c4f007 100644 --- a/.github/workflows/rapier-ci-bench.yml +++ b/.github/workflows/rapier-ci-bench.yml @@ -18,15 +18,17 @@ jobs: BENCHBOT_TARGET_COMMIT: ${{ github.event.pull_request.head.sha }} BENCHBOT_SHA: ${{ github.sha }} BENCHBOT_HEAD_REF: ${{github.head_ref}} + BENCHBOT_OTHER_BACKENDS: false runs-on: ubuntu-latest steps: - name: Find commit SHA if: github.ref == 'refs/heads/master' run: | echo "::set-env name=BENCHBOT_TARGET_COMMIT::$BENCHBOT_SHA" + echo "::set-env name=BENCHBOT_OTHER_BACKENDS::true" - name: Send 3D bench message shell: bash run: curl -u $BENCHBOT_AMQP_USER:$BENCHBOT_AMQP_PASS -i -H "content-type:application/json" -X POST https://$BENCHBOT_AMQP_HOST/api/exchanges/$BENCHBOT_AMQP_VHOST//publish - -d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"https://github.com/'$BENCHBOT_TARGET_REPO'\", \"branch\":\"'$GITHUB_REF'\", \"commit\":\"'$BENCHBOT_TARGET_COMMIT'\" }","payload_encoding":"string"}'
\ No newline at end of file + -d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"https://github.com/'$BENCHBOT_TARGET_REPO'\", \"branch\":\"'$GITHUB_REF'\", \"commit\":\"'$BENCHBOT_TARGET_COMMIT'\", \"other_backends\":'$BENCHBOT_OTHER_BACKENDS' }","payload_encoding":"string"}'
\ No newline at end of file @@ -1,4 +1,21 @@ -## v0.2.0 - WIP +## v0.3.0 +- Collider shapes are now trait-objects instead of a `Shape` enum. +- Add a user-defined `u128` to each colliders and rigid-bodies for storing user data. +- Add the support for `Cylinder`, `RoundCylinder`, and `Cone` shapes. +- Added the support for collision filtering based on bit masks (often known as collision groups, collision masks, or + collision layers in other physics engines). Each collider has two groups. Their `collision_groups` is used for filtering + what pair of colliders should have their contacts computed by the narrow-phase. Their `solver_groups` is used for filtering + what pair of colliders should have their contact forces computed by the constraints solver. +- Collision groups can also be used to filter what collider should be hit by a ray-cast performed by the `QueryPipeline`. +- Added collision filters based on user-defined trait-objects. This adds two traits `ContactPairFilter` and + `ProximityPairFilter` that allows user-defined logic for determining if two colliders/sensors are allowed to interact. +- The `PhysicsPipeline::step` method now takes two additional arguments: the optional `&ContactPairFilter` and `&ProximityPairFilter` +for filtering contact and proximity pairs. + +## v0.2.1 +- Fix panic in TriMesh construction and QueryPipeline update caused by a stack overflow or a subtraction underflow. + +## v0.2.0 The most significant change on this version is the addition of the `QueryPipeline` responsible for performing scene-wide queries. So far only ray-casting has been implemented. @@ -5,6 +5,11 @@ members = [ "build/rapier2d", "build/rapier_testbed2d", "examples2d", "benchmark [patch.crates-io] #wrapped2d = { git = "https://github.com/Bastacyclop/rust_box2d.git" } #simba = { path = "../simba" } +#ncollide2d = { path = "../ncollide/build/ncollide2d" } +#ncollide3d = { path = "../ncollide/build/ncollide3d" } +#nphysics2d = { path = "../nphysics/build/nphysics2d" } +#nphysics3d = { path = "../nphysics/build/nphysics3d" } +#kiss3d = { path = "../kiss3d" } [profile.release] #debug = true diff --git a/benchmarks2d/Cargo.toml b/benchmarks2d/Cargo.toml index b1ee8db..90a6326 100644 --- a/benchmarks2d/Cargo.toml +++ b/benchmarks2d/Cargo.toml @@ -14,7 +14,7 @@ enhanced-determinism = [ "rapier2d/enhanced-determinism" ] [dependencies] rand = "0.7" Inflector = "0.11" -nalgebra = "0.22" +nalgebra = "0.23" [dependencies.rapier_testbed2d] path = "../build/rapier_testbed2d" diff --git a/benchmarks3d/Cargo.toml b/benchmarks3d/Cargo.toml index 81c843a..03194df 100644 --- a/benchmarks3d/Cargo.toml +++ b/benchmarks3d/Cargo.toml @@ -14,7 +14,7 @@ enhanced-determinism = [ "rapier3d/enhanced-determinism" ] [dependencies] rand = "0.7" Inflector = "0.11" -nalgebra = "0.22" +nalgebra = "0.23" [dependencies.rapier_testbed3d] path = "../build/rapier_testbed3d" diff --git a/build/rapier2d/Cargo.toml b/build/rapier2d/Cargo.toml index ff5253b..d963079 100644 --- a/build/rapier2d/Cargo.toml +++ b/build/rapier2d/Cargo.toml @@ -1,7 +1,6 @@ -# Name idea: bident for 2D and trident for 3D [package] name = "rapier2d" -version = "0.2.0" +version = "0.3.0" authors = [ "Sébastien Crozet <developer@crozet.re>" ] description = "2-dimensional physics engine in Rust." documentation = "http://docs.rs/rapier2d" @@ -22,7 +21,7 @@ simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ] # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] wasm-bindgen = [ "instant/wasm-bindgen" ] -serde-serialize = [ "nalgebra/serde-serialize", "ncollide2d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ] +serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "ncollide2d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ] enhanced-determinism = [ "simba/libm_force", "indexmap" ] [lib] @@ -35,18 +34,22 @@ required-features = [ "dim2" ] vec_map = "0.8" instant = { version = "0.1", features = [ "now" ]} num-traits = "0.2" -nalgebra = "0.22" -ncollide2d = "0.24" -simba = "^0.2.1" -approx = "0.3" +nalgebra = "0.23" +ncollide2d = "0.26" +simba = "0.3" +approx = "0.4" rayon = { version = "1", optional = true } -crossbeam = "0.7" +crossbeam = "0.8" generational-arena = "0.2" arrayvec = "0.5" bit-vec = "0.6" rustc-hash = "1" serde = { version = "1", features = [ "derive" ], optional = true } +erased-serde = { version = "0.3", optional = true } indexmap = { version = "1", features = [ "serde-1" ], optional = true } +downcast-rs = "1.2" +num-derive = "0.3" +bitflags = "1" [dev-dependencies] bincode = "1" diff --git a/build/rapier3d/Cargo.toml b/build/rapier3d/Cargo.toml index 130e5dd..f5c2fe4 100644 --- a/build/rapier3d/Cargo.toml +++ b/build/rapier3d/Cargo.toml @@ -1,7 +1,6 @@ -# Name idea: bident for 2D and trident for 3D [package] name = "rapier3d" -version = "0.2.0" +version = "0.3.0" authors = [ "Sébastien Crozet <developer@crozet.re>" ] description = "3-dimensional physics engine in Rust." documentation = "http://docs.rs/rapier3d" @@ -22,7 +21,7 @@ simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ] # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] wasm-bindgen = [ "instant/wasm-bindgen" ] -serde-serialize = [ "nalgebra/serde-serialize", "ncollide3d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ] +serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "ncollide3d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ] enhanced-determinism = [ "simba/libm_force", "indexmap" ] [lib] @@ -35,18 +34,22 @@ required-features = [ "dim3" ] vec_map = "0.8" instant = { version = "0.1", features = [ "now" ]} num-traits = "0.2" -nalgebra = "0.22" -ncollide3d = "0.24" -simba = "^0.2.1" -approx = "0.3" +nalgebra = "0.23" +ncollide3d = "0.26" +simba = "0.3" +approx = "0.4" rayon = { version = "1", optional = true } -crossbeam = "0.7" +crossbeam = "0.8" generational-arena = "0.2" arrayvec = "0.5" bit-vec = "0.6" rustc-hash = "1" serde = { version = "1", features = [ "derive" ], optional = true } +erased-serde = { version = "0.3", optional = true } indexmap = { version = "1", features = [ "serde-1" ], optional = true } +downcast-rs = "1.2" +num-derive = "0.3" +bitflags = "1" [dev-dependencies] bincode = "1" diff --git a/build/rapier_testbed2d/Cargo.toml b/build/rapier_testbed2d/Cargo.toml index eeecb2a..08c0893 100644 --- a/build/rapier_testbed2d/Cargo.toml +++ b/build/rapier_testbed2d/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rapier_testbed2d" -version = "0.2.0" +version = "0.3.0" authors = [ "Sébastien Crozet <developer@crozet.re>" ] description = "Testbed for the 2-dimensional physics engine in Rust." homepage = "http://rapier.org" @@ -23,17 +23,17 @@ other-backends = [ "wrapped2d", "nphysics2d" ] [dependencies] -nalgebra = "0.22" -kiss3d = { version = "0.25", features = [ "conrod" ] } +nalgebra = "0.23" +kiss3d = { version = "0.27", features = [ "conrod" ] } rand = "0.7" rand_pcg = "0.2" instant = { version = "0.1", features = [ "web-sys", "now" ]} bitflags = "1" num_cpus = { version = "1", optional = true } wrapped2d = { version = "0.4", optional = true } -ncollide2d = "0.24" -nphysics2d = { version = "0.17", optional = true } -crossbeam = "0.7" +ncollide2d = "0.26" +nphysics2d = { version = "0.18", optional = true } +crossbeam = "0.8" bincode = "1" flexbuffers = "0.1" Inflector = "0.11" @@ -42,5 +42,5 @@ md5 = "0.7" [dependencies.rapier2d] path = "../rapier2d" -version = "0.2" +version = "0.3" features = [ "serde-serialize" ] diff --git a/build/rapier_testbed3d/Cargo.toml b/build/rapier_testbed3d/Cargo.toml index 7675701..7fa01d7 100644 --- a/build/rapier_testbed3d/Cargo.toml +++ b/build/rapier_testbed3d/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rapier_testbed3d" -version = "0.2.0" +version = "0.3.0" authors = [ "Sébastien Crozet <developer@crozet.re>" ] description = "Testbed for the 3-dimensional physics engine in Rust." homepage = "http://rapier.org" @@ -22,19 +22,19 @@ parallel = [ "rapier3d/parallel", "num_cpus" ] other-backends = [ "physx", "physx-sys", "glam", "nphysics3d" ] [dependencies] -nalgebra = "0.22" -kiss3d = { version = "0.25", features = [ "conrod" ] } +nalgebra = "0.23" +kiss3d = { version = "0.27", features = [ "conrod" ] } rand = "0.7" rand_pcg = "0.2" instant = { version = "0.1", features = [ "web-sys", "now" ]} bitflags = "1" -glam = { version = "0.8", optional = true } +glam = { version = "0.9", optional = true } num_cpus = { version = "1", optional = true } -ncollide3d = "0.24" -nphysics3d = { version = "0.17", optional = true } -physx = { version = "0.6", optional = true } +ncollide3d = "0.26" +nphysics3d = { version = "0.18", optional = true } +physx = { version = "0.7", optional = true } physx-sys = { version = "0.4", optional = true } -crossbeam = "0.7" +crossbeam = "0.8" bincode = "1" flexbuffers = "0.1" serde_cbor = "0.11" @@ -44,5 +44,5 @@ serde = { version = "1", features = [ "derive" ] } [dependencies.rapier3d] path = "../rapier3d" -version = "0.2" +version = "0.3" features = [ "serde-serialize" ] diff --git a/examples2d/Cargo.toml b/examples2d/Cargo.toml index ad63958..f1ed728 100644 --- a/examples2d/Cargo.toml +++ b/examples2d/Cargo.toml @@ -14,7 +14,7 @@ enhanced-determinism = [ "rapier2d/enhanced-determinism" ] [dependencies] rand = "0.7" Inflector = "0.11" -nalgebra = "0.22" +nalgebra = "0.23" [dependencies.rapier_testbed2d] path = "../build/rapier_testbed2d" diff --git a/examples2d/all_examples2.rs b/examples2d/all_examples2.rs index 7ee924e..a7ddc75 100644 --- a/examples2d/all_examples2.rs +++ b/examples2d/all_examples2.rs @@ -11,6 +11,7 @@ use rapier_testbed2d::Testbed; use std::cmp::Ordering; mod add_remove2; +mod collision_groups2; mod debug_box_ball2; mod debug_infinite_fall; mod heightfield2; @@ -53,6 +54,7 @@ pub fn main() { let mut builders: Vec<(_, fn(&mut Testbed))> = vec