Commit Graph

304 Commits

Author SHA1 Message Date
Crozet Sébastien
3a1502be74 First complete implementation of the hierarchical SAP. 2021-03-13 18:00:58 +01:00
Crozet Sébastien
a967ace7d4 Start implementing SAPLayer creation and insertion. 2021-03-08 18:27:06 +01:00
Crozet Sébastien
7983c25606 Start introducing SAP layers. 2021-03-08 15:32:04 +01:00
Crozet Sébastien
0b80bc827c Split the broad-phase code into multiple files. 2021-03-08 15:32:04 +01:00
Sébastien Crozet
808ea02672 Merge pull request #141 from EmbarkStudios/per-collider-mass-props
Per collider mass props
2021-03-08 10:38:31 +01:00
Emil Ernerfeldt
0370e7e37d Store either density or mass properties but not both 2021-03-08 10:12:12 +01:00
Emil Ernerfeldt
05614dc471 docstring/spelling
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-03-08 10:04:28 +01:00
Emil Ernerfeldt
22a402983c docstring/spelling
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-03-08 10:04:21 +01:00
Emil Ernerfeldt
5154233176 docstring/spelling
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-03-08 10:04:13 +01:00
Emil Ernerfeldt
018cc23639 docstring/spelling
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-03-08 10:04:07 +01:00
Crozet Sébastien
bed47a82e7 Projection friction impulses on an implicit cone instead of a pyramidal approximation. 2021-03-07 11:44:19 +01:00
Emil Ernerfeldt
0909077094 Use Box<Option<MassProperties>> instead to save on memory 2021-03-05 12:04:27 +01:00
Emil Ernerfeldt
64af425227 Add ability to set MassProperties for each ColliderBuilder
Fix https://github.com/dimforge/rapier/issues/132
2021-03-05 11:57:08 +01:00
Crozet Sébastien
e45342d365 Fix determinism issue after restoring a snapshot. 2021-03-02 11:24:56 +01:00
Crozet Sébastien
f53d0438ed Contact modification: make the contact normal modifiable too. 2021-02-25 15:40:54 +01:00
Crozet Sébastien
96ecb877e2 Implement dominance. 2021-02-24 13:26:51 +01:00
Crozet Sébastien
0f0f2c344f Rename modify_contacts -> modify_solver_contacts. 2021-02-23 16:02:19 +01:00
Crozet Sébastien
babcab0bed Update the testbed to use PhysicsHooks. 2021-02-23 15:49:23 +01:00
Crozet Sébastien
4ca32a9546 Add one-way platform + conveyor belt demos. 2021-02-23 15:43:43 +01:00
Crozet Sébastien
00706e8b36 Introduce the PhysicsHook trait used for both contact filtering and contact modification. 2021-02-23 11:24:54 +01:00
Crozet Sébastien
ad5c10672e Use contact ids instead of contact reordering in order to identify the impulse writeback location. 2021-02-22 17:52:03 +01:00
Emil Ernerfeldt
f9e3d382d2 New contacts are bouncy, old are resting
If a contact is new (previous impluse = 0), then we treat it as bouncy (respecting restitution).
If the contact is old we treat it as resting.

Exceptions for restitutions <=0 and >= 1.
2021-02-18 15:41:46 +01:00
Emil Ernerfeldt
f2d9225101 Add ColliderHandle:s to PairFilterContext
This makes it easy to write custom filters based on the handles.

For instance, a user can add pairs of `ColliderHandle`s into a `HashSet` and
do a lookup in a `ContactPairFilter` to easily (if maybe not efficiently)
disable collisions between pairs of colliders.

The same could be accomplished by using the `user_data: u128` field of the
`Collider`, but it would be less ergonomic, and also with this PR that
`user_data` space can be saved for more important things.
2021-02-17 11:19:51 +01:00
Alec Deason
365426555c Fix a small documentation typo 2021-02-13 20:03:51 -08:00
Crozet Sébastien
e24d73a255 Don't serialize solver contacts + remove erased-serde dependency. 2021-02-08 10:47:58 +01:00
Emil Ernerfeldt
85bc81d4fc Make clippy a bit happier 2021-02-04 13:11:04 +01:00
Crozet Sébastien
8ff2bcc3ec Add all the missing docs. 2021-01-27 14:20:14 +01:00
Crozet Sébastien
23a86c294e Allow using polylines as a collider shape. 2021-01-26 16:41:21 +01:00
Crozet Sébastien
e1f50eb6e8 Fix compilation with f64. 2021-01-25 17:33:28 +01:00
Crozet Sébastien
4799a81214 Add missing constructor for a round-triangle collider. 2021-01-25 17:22:57 +01:00
Crozet Sébastien
8f7220f03d Rename cdl to parry. 2021-01-24 11:13:44 +01:00
Crozet Sébastien
90db26eb50 Fix warnings in tests and testbed. 2021-01-23 13:34:03 +01:00
Crozet Sébastien
e45e5f109c Fix WASM build. 2021-01-23 13:11:00 +01:00
Crozet Sébastien
57072f3ba7 Move ColliderShape out of Rapier. 2021-01-22 18:10:54 +01:00
Crozet Sébastien
b779eb261e Fix compilation in 2D. 2021-01-22 16:43:16 +01:00
Crozet Sébastien
800b35b103 Add collider constructors for shapes obtained from convex decomposition. 2021-01-21 16:29:05 +01:00
Crozet Sébastien
98d3980db7 Allow several rules for combining friction/restitution coefficients. 2021-01-21 16:03:27 +01:00
Crozet Sébastien
0ade350b5f Use newtypes for collider, rigid-body and joint handles. 2021-01-20 16:33:42 +01:00
Crozet Sébastien
28b7866aee Switch to [u32; DIM] instead of Point<u32> for element indices. 2021-01-20 15:40:00 +01:00
Crozet Sébastien
e2006599a8 Add 3D convex decomposition example. 2021-01-20 15:15:33 +01:00
Crozet Sébastien
261ed1ebed Fix 2D compilation. 2021-01-06 12:53:26 +01:00
Crozet Sébastien
00da4aaa42 Add compound shape support. 2021-01-05 15:34:48 +01:00
Crozet Sébastien
aa61fe65e3 Add support of 64-bits reals. 2021-01-04 15:14:25 +01:00
Crozet Sébastien
7b098606c2 QueryPipeline: add shape casting, point projection, and intersection queries. 2020-12-31 16:30:38 +01:00
Crozet Sébastien
1feac2e02d Restore contact events. 2020-12-31 11:37:42 +01:00
Crozet Sébastien
967145a949 Perform contact sorting in the narrow-phase directly. 2020-12-31 11:16:03 +01:00
Crozet Sébastien
348a339fe3 Remove code related to point-point kinematics. 2020-12-31 10:02:51 +01:00
Crozet Sébastien
43628c8846 Try using solver contacts again, but in a more cache-coherent way. 2020-12-30 17:30:07 +01:00
Crozet Sébastien
5876a262da Remove the useless manifold.data.pair field. 2020-12-30 11:44:08 +01:00
Crozet Sébastien
94c67a0c31 Support compound shapes. 2020-12-29 11:36:19 +01:00