profile
viewpoint

dimforge/nalgebra 1845

Linear algebra library for Rust.

dimforge/nphysics 1415

2 and 3-dimensional rigid body physics engine for Rust.

dimforge/ncollide 833

2 and 3-dimensional collision detection library in Rust.

luqmana/rust-opencl 166

OpenCL bindings for Rust.

dimforge/alga 142

Abstract algebra for Rust.

dimforge/salva 117

2 and 3-dimensional fluid simulation library in Rust.

brendanzab/approx 83

Approximate floating point equality comparisons and assertions

dimforge/rapier.js 79

Official JavaScript bindings for the Rapier physics engine.

dimforge/simba 66

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.

brendanzab/algebra 53

Abstract algebra for Rust (still very much a WIP!)

push eventdimforge/nalgebra

Michael Stevens

commit sha 0a0799f76a8cfd1cc46561807677c612ef8731ea

Remove unnecessary Trait bound DimSub<Dynamic> in fn cholesky(self)

view details

Sébastien Crozet

commit sha eb9408476045b9ebc81f53b339d6134d29c23f6f

Merge pull request #756 from dayrover/cholesky Remove unnecessary Trait bound DimSub<Dynamic> in fn cholesky(self)

view details

push time in 6 hours

PR merged dimforge/nalgebra

Remove unnecessary Trait bound DimSub<Dynamic> in fn cholesky(self)

Follows on from #706 The bound is unnecessary as there is no use of DimDiff in the implementation. Integration tests are OK with it replaced by a simple Dim

+2 -2

0 comment

1 changed file

dayrover

pr closed time in 6 hours

pull request commentdimforge/nalgebra

Update version in docs header

Thanks!

TheZoq2

comment created time in 6 hours

push eventdimforge/nalgebra

Frans Skarman

commit sha 0f6c0e52339bb040f37e8e58a3c8500b7a609600

Update version in docs header

view details

Sébastien Crozet

commit sha c240923abb38d15b1c3a00be4749ec98e6d591b5

Merge pull request #754 from TheZoq2/patch-1 Update version in docs header

view details

push time in 6 hours

PR merged dimforge/nalgebra

Update version in docs header

Looks like the docs are pointing to an outdated version, this is a fix for that

+1 -1

0 comment

1 changed file

TheZoq2

pr closed time in 6 hours

created tagdimforge/simba

tagv0.3.0

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.

created time in 6 hours

push eventdimforge/simba

Crozet Sébastien

commit sha b31044f4e9e6f84bff6cfab02d5f8f191d1e259c

Release v0.3.0

view details

push time in 6 hours

delete branch dimforge/simba

delete branch : deps_up

delete time in 6 hours

push eventdimforge/simba

Crozet Sébastien

commit sha ebf0207ecc38cd1fbc0ba9a108e0fe7728488778

Update dependencies.

view details

Crozet Sébastien

commit sha 3ed8b8193c708787f9877f7b0179978b87747796

Fix compilation with the latest version of Wide.

view details

Sébastien Crozet

commit sha 4abc8afa286a480e7be7d01cb4bf25e1705d8788

Merge pull request #19 from dimforge/deps_up Update dependencies.

view details

push time in 6 hours

PR merged dimforge/simba

Update dependencies. breaking change
+80 -39

0 comment

2 changed files

sebcrozet

pr closed time in 6 hours

push eventdimforge/simba

Crozet Sébastien

commit sha 3ed8b8193c708787f9877f7b0179978b87747796

Fix compilation with the latest version of Wide.

view details

push time in 6 hours

PR opened dimforge/simba

Update dependencies.
+3 -3

0 comment

1 changed file

pr created time in 7 hours

create barnchdimforge/simba

branch : deps_up

created branch time in 7 hours

delete branch dimforge/simba

delete branch : copysign_argument_order

delete time in 7 hours

push eventdimforge/simba

Crozet Sébastien

commit sha c96b8aeb8fe66129e0cd53f64eeb8567dd5b77d5

Swap the argument order of copysign.

view details

Sébastien Crozet

commit sha b6c8574467d023552e0ff681cf1467095ca0d2c1

Merge pull request #18 from dimforge/copysign_argument_order Swap the argument order of copysign.

view details

push time in 7 hours

PR merged dimforge/simba

Swap the argument order of copysign. breaking change

This is technically not a breaking change because it won't cause existing code to not compile anymore. However it is an important semantic change to justify a major release:

  • The arguments of copysign are now swapped: a.copysign(b) will copy the sign of b into a (the previous behavior copied the sign of a into b). This change was needed to align with the argument order used by the standard library, thus avoiding hard-to-debug errors due to mismatching conventions.
  • The arguments of simd_copysign are now swapped too.
+28 -20

0 comment

7 changed files

sebcrozet

pr closed time in 7 hours

PR opened dimforge/simba

Swap the argument order of copysign. breaking change

This is technically not a breaking change because it won't cause existing code to not compile anymore. However it is an important semantic change to justify a major release:

  • The arguments of copysign are now swapped: a.copysign(b) will copy the sign of b into a (the previous behavior copied the sign of a into b). This change was needed to align with the argument order used by the standard library, thus avoiding hard-to-debug errors due to mismatching conventions.
  • The arguments of simd_copysign are now swapped too.
+28 -20

0 comment

7 changed files

pr created time in 7 hours

created tagsebcrozet/instant

tagv0.1.8

A std::time::Instant replacement that works on WASM too.

created time in 7 hours

push eventsebcrozet/instant

Crozet Sébastien

commit sha 3819881b22c13652f3d625f6e7668ccfb2bd27bd

Release v0.1.8

view details

push time in 7 hours

PR closed sebcrozet/instant

Update cfg-if
+1 -1

1 comment

1 changed file

kornelski

pr closed time in 7 hours

pull request commentsebcrozet/instant

Update cfg-if

Thank you for this PR. Though it is a duplicate of #27 which has been merged just now.

kornelski

comment created time in 7 hours

pull request commentsebcrozet/instant

Update to cfg-if 1.0

Thanks!

mbrubeck

comment created time in 7 hours

push eventsebcrozet/instant

Matt Brubeck

commit sha 5bfaad2835d4f95d240797690a53ecca5d5091de

Update to cfg-if 1.0

view details

push time in 7 hours

PR merged sebcrozet/instant

Update to cfg-if 1.0
+1 -1

0 comment

1 changed file

mbrubeck

pr closed time in 7 hours

pull request commentdimforge/nalgebra

Add UDU factorization

@ChristopherRabotin Hi! Thank you for this PR. Sorry I did not have the time to review this so far. I will make a detailed review next week-end.

ChristopherRabotin

comment created time in 3 days

push eventdimforge/rapier

Crozet Sébastien

commit sha b9156302d331a1eaf9f40b84d8c1ffd68b9040ed

Replace rounding -> round.

view details

push time in 4 days

created tagdimforge/rapier.js

tagv0.2.4

Official JavaScript bindings for the Rapier physics engine.

created time in 4 days

push eventdimforge/rapier.js

Crozet Sébastien

commit sha 39cfd19b065d6d316137ab058450007bbfc8dbe6

Fix round cylinders.

view details

Crozet Sébastien

commit sha 516f615ac515e1aee87a0be2fffd35057284fb75

Release v0.2.4

view details

push time in 4 days

push eventdimforge/rapier

Crozet Sébastien

commit sha 949e3f5384a366c3bff5415c5db4635e811a580e

Fix many warnings.

view details

Crozet Sébastien

commit sha f7a6f433d62ea427f6e2233365a6f534ca7e1c63

Rename rounded -> round.

view details

push time in 4 days

created tagdimforge/rapier.js

tagv0.2.3

Official JavaScript bindings for the Rapier physics engine.

created time in 4 days

push eventdimforge/rapier.js

Crozet Sébastien

commit sha 249692b63dd27f1cc14600931bdb1e5708ffeac8

Add the support of cylinder, round cylinder, cone, and capsule shapes.

view details

Crozet Sébastien

commit sha 7d6689e4752cd36c5444657e8f2c23494fb8d171

Release v0.2.3

view details

push time in 4 days

push eventdimforge/rapier

Crozet Sébastien

commit sha 947c4813c9666fd8215743de298fe17780fa3ef2

Complete the pfm/pfm contact generator.

view details

Crozet Sébastien

commit sha 865ce8a8e5301b23ca474adaaffe8b43e725803e

Collider shape: use a trait-object instead of an enum.

view details

Crozet Sébastien

commit sha d513c22d33ab44b0048355bcfd1db4173b3f7ece

Add cone support.

view details

Crozet Sébastien

commit sha 64958470950cd9832a669b1bd5d70a2aeb6a85ef

Add rounded cylinder.

view details

push time in 4 days

push eventdimforge/simba

Crozet Sébastien

commit sha 0aef294bbeea95d835f1bdc8226760cf4c8fc403

Make our Fixed wrapper repr(transparent).

view details

Crozet Sébastien

commit sha 64718eee3182daed59ad7046a72250da5268cb84

Make Fixed::from_bits and Fixed.to_bits const-fn.

view details

Crozet Sébastien

commit sha d811d4d7fecedf6be8a3c2d416f2a3ce0380a93b

Update changelog.

view details

Sébastien Crozet

commit sha f5a7ed4af96abc8c6cc1e02472fe2b0a6156ae6f

Merge pull request #17 from dimforge/fixed_const_fn_transparent Make Fixed transparent and from/to bits const-fn.

view details

Crozet Sébastien

commit sha de359044bf30d8bbd8b31454d42930af14574955

Release v0.2.4

view details

Crozet Sébastien

commit sha c96b8aeb8fe66129e0cd53f64eeb8567dd5b77d5

Swap the argument order of copysign.

view details

push time in 4 days

created tagdimforge/simba

tagv0.2.4

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.

created time in 4 days

push eventdimforge/simba

Crozet Sébastien

commit sha de359044bf30d8bbd8b31454d42930af14574955

Release v0.2.4

view details

push time in 4 days

delete branch dimforge/simba

delete branch : fixed_const_fn_transparent

delete time in 4 days

push eventdimforge/simba

Crozet Sébastien

commit sha 0aef294bbeea95d835f1bdc8226760cf4c8fc403

Make our Fixed wrapper repr(transparent).

view details

Crozet Sébastien

commit sha 64718eee3182daed59ad7046a72250da5268cb84

Make Fixed::from_bits and Fixed.to_bits const-fn.

view details

Crozet Sébastien

commit sha d811d4d7fecedf6be8a3c2d416f2a3ce0380a93b

Update changelog.

view details

Sébastien Crozet

commit sha f5a7ed4af96abc8c6cc1e02472fe2b0a6156ae6f

Merge pull request #17 from dimforge/fixed_const_fn_transparent Make Fixed transparent and from/to bits const-fn.

view details

push time in 4 days

create barnchdimforge/simba

branch : fixed_const_fn_transparent

created branch time in 5 days

issue openeddimforge/nalgebra

Add lerp_slerp for isometry interpolation.

In ncollide we have an IsometryOps trait that defines the lerp_slep method for isometry interpolation. This interpolation uses linear interpolation for the translation part of the isometry, and spherical interpolation for its angular part.

We should add this lerp_slerp method directly to nalgebra's Isometry type.

created time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha dab5d97f70da8bf14ecee533e12ed2604b5f0a66

Fix compilation with no-std and libm feature. Fix #14

view details

Crozet Sébastien

commit sha a9f43e7baf8c0f2ba2dcc0720ec4d6ef4dd3f7c1

CI: add compilation with no-std and the libm feature enabled.

view details

Sébastien Crozet

commit sha 84f24eeaf15f69ed91e6058493d4e8f611b4612f

Merge pull request #15 from dimforge/auto_simd_libm Fix compilation with no-std and libm feature.

view details

Crozet Sébastien

commit sha 5673fcf43276ad599bc581965cae3bb3a6a1318d

Release v0.2.2

view details

Crozet Sébastien

commit sha 1e109a9eb6e7ec21e4ddefa3fa8adb16c07d3532

Add more fixed-point operations. See the changelog for details.

view details

Crozet Sébastien

commit sha 73f687958f2194fc4dd8337fe2949c926432210f

Update the changelog.

view details

Crozet Sébastien

commit sha 942ed134d86e3f22a656f46918eddb84c688b87d

CI: add a partial_fixed_point_support build.

view details

Sébastien Crozet

commit sha da90437a639dd2e37693b1bd91c8b950fdd6d9ca

Merge pull request #16 from dimforge/more_fixed_ops Add more fixed-point operations

view details

Crozet Sébastien

commit sha 956bc0c2c74ae2ae72fae8d44fd508703bfab09e

Release v0.2.3

view details

Crozet Sébastien

commit sha 31fdafcc58ac964546c98f925f5e9b37d485f34a

Swap the argument order of copysign.

view details

push time in 6 days

issue commentdimforge/nalgebra

Convert static sized Point to dynamic?

Also note that if you want a point of dimension greater than 6, you can define it as nalgebra::Point<f32, nalgebra::U32> for example. It will still be statically-sized though.

chargerKong

comment created time in 6 days

issue commentdimforge/nalgebra

Convert static sized Point to dynamic?

Hi!

Right now matrices (and vectors) are the only entities that can be dynamically-sized in nalgebra. All the geometry-related types like Point, Isometry, Rotation, etc. must be statically sized, to keep them simpler to implement, optimize, and easier to use.

chargerKong

comment created time in 6 days

created tagdimforge/simba

tagv0.2.3

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.

created time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha 956bc0c2c74ae2ae72fae8d44fd508703bfab09e

Release v0.2.3

view details

push time in 6 days

delete branch dimforge/simba

delete branch : more_fixed_ops

delete time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha 1e109a9eb6e7ec21e4ddefa3fa8adb16c07d3532

Add more fixed-point operations. See the changelog for details.

view details

Crozet Sébastien

commit sha 73f687958f2194fc4dd8337fe2949c926432210f

Update the changelog.

view details

Crozet Sébastien

commit sha 942ed134d86e3f22a656f46918eddb84c688b87d

CI: add a partial_fixed_point_support build.

view details

Sébastien Crozet

commit sha da90437a639dd2e37693b1bd91c8b950fdd6d9ca

Merge pull request #16 from dimforge/more_fixed_ops Add more fixed-point operations

view details

push time in 6 days

PR merged dimforge/simba

Add more fixed-point operations
  • Add .to_bits to our fixed-point number newtype.
  • Add ::from_bits to our fixed-point number newtype.
  • Add Ord implementation for our fixed-point number newtype.
  • Add Mul<int>, Div<int>, Rem<int>, MulAssign<int>, DivAssign<int>, RemAssign<int> implementation for our fixed-point number newtype, where int is the underlying integer used by the fixed-point number.
+83 -0

0 comment

3 changed files

sebcrozet

pr closed time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha 942ed134d86e3f22a656f46918eddb84c688b87d

CI: add a partial_fixed_point_support build.

view details

push time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha 73f687958f2194fc4dd8337fe2949c926432210f

Update the changelog.

view details

push time in 6 days

PR opened dimforge/simba

Add more fixed-point operations
  • Add .to_bits to our fixed-point number newtype.
  • Add ::from_bits to our fixed-point number newtype.
  • Add Ord implementation for our fixed-point number newtype.
  • Add .to_bits to our fixed-point number newtype.
  • Add .to_bits to our fixed-point number newtype.
  • Add .to_bits to our fixed-point number newtype.
  • Add Mul<int>, Div<int>, Rem<int>, MulAssign<int>, DivAssign<int>, RemAssign<int> implementation for our fixed-point number newtype, where int is the underlying integer used by the fixed-point number.
+83 -0

0 comment

2 changed files

pr created time in 6 days

create barnchdimforge/simba

branch : more_fixed_ops

created branch time in 6 days

issue commentdimforge/simba

regression: "no method named `floor` found for type `f32` in the current scope"

Thank you for noticing and reporting this. I published the version 0.2.2 with a fix, and yanked the version 0.2.1.

astraw

comment created time in 6 days

created tagdimforge/simba

tagv0.2.2

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.

created time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha 5673fcf43276ad599bc581965cae3bb3a6a1318d

Release v0.2.2

view details

push time in 6 days

delete branch dimforge/simba

delete branch : auto_simd_libm

delete time in 6 days

push eventdimforge/simba

Crozet Sébastien

commit sha dab5d97f70da8bf14ecee533e12ed2604b5f0a66

Fix compilation with no-std and libm feature. Fix #14

view details

Crozet Sébastien

commit sha a9f43e7baf8c0f2ba2dcc0720ec4d6ef4dd3f7c1

CI: add compilation with no-std and the libm feature enabled.

view details

Sébastien Crozet

commit sha 84f24eeaf15f69ed91e6058493d4e8f611b4612f

Merge pull request #15 from dimforge/auto_simd_libm Fix compilation with no-std and libm feature.

view details

push time in 6 days

PR merged dimforge/simba

Fix compilation with no-std and libm feature.

This also adds to the CI a compilation with no-std and libm so we can detect this kind of regression earlier. Fix #14

+4 -1

0 comment

2 changed files

sebcrozet

pr closed time in 6 days

issue closeddimforge/simba

regression: "no method named `floor` found for type `f32` in the current scope"

Hi, when upgrading from 0.2.0 to 0.2.1 (via "cargo update", for example), the new auto_simd_impl module fails to compile. simba is a transitive dependency of adskalman-rs. The simba requirement is brought in through nalgebra 0.22 with default features disabled and the libm feature enabled.

Here is the relevant part of Cargo.toml:

[dependencies]
nalgebra = {version="0.22", default-features=false, features=["libm"]}

You can look at an example build failure here https://github.com/strawlab/adskalman-rs/runs/1273243793 . Here is the relevant excerpt:

2020-10-19T04:58:42.2753561Z ##[group]Run cargo build
2020-10-19T04:58:42.2754019Z cargo build
2020-10-19T04:58:42.2794948Z shell: /bin/bash -e {0}
2020-10-19T04:58:42.2795288Z ##[endgroup]
2020-10-19T04:58:49.3160390Z     Updating crates.io index
2020-10-19T04:59:04.5300477Z     Updating git repository `https://github.com/strawlab/nalgebra-rand-mvn`
2020-10-19T04:59:04.7407493Z  Downloading crates ...
2020-10-19T04:59:04.8873833Z   Downloaded libm v0.2.1
2020-10-19T04:59:04.8991012Z   Downloaded paste-impl v0.1.18
2020-10-19T04:59:04.9004006Z   Downloaded num-traits v0.2.12
2020-10-19T04:59:04.9031778Z   Downloaded typenum v1.12.0
2020-10-19T04:59:04.9058033Z   Downloaded num-integer v0.1.43
2020-10-19T04:59:04.9076730Z   Downloaded simba v0.2.1
2020-10-19T04:59:04.9110998Z   Downloaded rand_chacha v0.2.2
2020-10-19T04:59:04.9122747Z   Downloaded rand_core v0.5.1
2020-10-19T04:59:04.9140039Z   Downloaded rand v0.7.3
2020-10-19T04:59:04.9195341Z   Downloaded autocfg v1.0.1
2020-10-19T04:59:04.9209759Z   Downloaded approx v0.3.2
2020-10-19T04:59:04.9225894Z   Downloaded proc-macro-hack v0.5.18
2020-10-19T04:59:04.9243806Z   Downloaded ppv-lite86 v0.2.9
2020-10-19T04:59:04.9256085Z   Downloaded paste v0.1.18
2020-10-19T04:59:04.9281813Z   Downloaded itertools v0.9.0
2020-10-19T04:59:04.9341314Z   Downloaded num-complex v0.2.4
2020-10-19T04:59:04.9356049Z   Downloaded log v0.4.11
2020-10-19T04:59:04.9382372Z   Downloaded either v1.6.1
2020-10-19T04:59:04.9394714Z   Downloaded cfg-if v0.1.10
2020-10-19T04:59:04.9405834Z   Downloaded num-rational v0.2.4
2020-10-19T04:59:04.9421917Z   Downloaded nalgebra v0.22.1
2020-10-19T04:59:04.9605885Z   Downloaded generic-array v0.13.2
2020-10-19T04:59:04.9660030Z    Compiling autocfg v1.0.1
2020-10-19T04:59:04.9662083Z    Compiling libm v0.2.1
2020-10-19T04:59:13.0282185Z    Compiling proc-macro-hack v0.5.18
2020-10-19T04:59:14.3810280Z    Compiling typenum v1.12.0
2020-10-19T04:59:14.9738980Z    Compiling rand_core v0.5.1
2020-10-19T04:59:15.2548227Z    Compiling ppv-lite86 v0.2.9
2020-10-19T04:59:15.4731143Z    Compiling log v0.4.11
2020-10-19T04:59:15.7339117Z    Compiling either v1.6.1
2020-10-19T04:59:15.8889314Z    Compiling cfg-if v0.1.10
2020-10-19T04:59:15.9216382Z    Compiling num-traits v0.2.12
2020-10-19T04:59:15.9986437Z    Compiling num-complex v0.2.4
2020-10-19T04:59:16.1825564Z    Compiling num-integer v0.1.43
2020-10-19T04:59:16.2599663Z    Compiling num-rational v0.2.4
2020-10-19T04:59:16.4607012Z    Compiling paste-impl v0.1.18
2020-10-19T04:59:16.6719174Z    Compiling itertools v0.9.0
2020-10-19T04:59:17.4802590Z    Compiling rand_chacha v0.2.2
2020-10-19T04:59:18.7762096Z    Compiling paste v0.1.18
2020-10-19T04:59:18.8147552Z    Compiling rand v0.7.3
2020-10-19T04:59:19.6569617Z    Compiling generic-array v0.13.2
2020-10-19T04:59:20.0426133Z    Compiling approx v0.3.2
2020-10-19T04:59:20.6779437Z    Compiling simba v0.2.1
2020-10-19T04:59:24.0738517Z error[E0599]: no method named `floor` found for type `f32` in the current scope
2020-10-19T04:59:24.0741232Z     --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/simba-0.2.1/src/simd/auto_simd_impl.rs:822:32
2020-10-19T04:59:24.0742499Z      |
2020-10-19T04:59:24.0743108Z 822  |                   self.map(|e| e.floor())
2020-10-19T04:59:24.0743834Z      |                                  ^^^^^ method not found in `f32`
2020-10-19T04:59:24.0744443Z ...
2020-10-19T04:59:24.0745150Z 1435 | / impl_float_simd!(
2020-10-19T04:59:24.0745882Z 1436 | |     [f32; 2], f32, 2, [i32; 2], AutoBoolx2, _0, _1;
2020-10-19T04:59:24.0746550Z 1437 | |     [f32; 4], f32, 4, [i32; 4], AutoBoolx4, _0, _1, _2, _3;
2020-10-19T04:59:24.0747254Z 1438 | |     [f32; 8], f32, 8, [i32; 8], AutoBoolx8, _0, _1, _2, _3, _4, _5, _6, _7;
2020-10-19T04:59:24.0747816Z ...    |
2020-10-19T04:59:24.0748368Z 1442 | |     [f64; 8], f64, 8, [i64; 8], AutoBoolx8, _0, _1, _2, _3, _4, _5, _6, _7;
2020-10-19T04:59:24.0748927Z 1443 | | );
2020-10-19T04:59:24.0749795Z      | |__- in this macro invocation
2020-10-19T04:59:24.0750326Z      |
2020-10-19T04:59:24.0751320Z      = help: items from traits can only be used if the trait is in scope
2020-10-19T04:59:24.0752509Z      = note: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
2020-10-19T04:59:24.0754922Z              candidate #1: `use crate::scalar::complex::ComplexField;`
2020-10-19T04:59:24.0756063Z              candidate #2: `use crate::num::float::FloatCore;`
2020-10-19T04:59:24.0756902Z              candidate #3: `use crate::num::Float;`
2020-10-19T04:59:24.0757680Z              candidate #4: `use crate::num::real::Real;`
2020-10-19T04:59:24.0759342Z      = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-10-19T04:59:24.0760231Z 
2020-10-19T04:59:24.0783529Z error[E0599]: no method named `floor` found for type `f64` in the current scope
2020-10-19T04:59:24.0784858Z     --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/simba-0.2.1/src/simd/auto_simd_impl.rs:822:32
2020-10-19T04:59:24.0785458Z      |
2020-10-19T04:59:24.0785700Z 822  |                   self.map(|e| e.floor())
2020-10-19T04:59:24.0785994Z      |                                  ^^^^^ method not found in `f64`
2020-10-19T04:59:24.0786234Z ...
2020-10-19T04:59:24.0786449Z 1435 | / impl_float_simd!(
2020-10-19T04:59:24.0786725Z 1436 | |     [f32; 2], f32, 2, [i32; 2], AutoBoolx2, _0, _1;
2020-10-19T04:59:24.0787048Z 1437 | |     [f32; 4], f32, 4, [i32; 4], AutoBoolx4, _0, _1, _2, _3;
2020-10-19T04:59:24.0787374Z 1438 | |     [f32; 8], f32, 8, [i32; 8], AutoBoolx8, _0, _1, _2, _3, _4, _5, _6, _7;
2020-10-19T04:59:24.0787632Z ...    |
2020-10-19T04:59:24.0787887Z 1442 | |     [f64; 8], f64, 8, [i64; 8], AutoBoolx8, _0, _1, _2, _3, _4, _5, _6, _7;
2020-10-19T04:59:24.0788142Z 1443 | | );
2020-10-19T04:59:24.0788524Z      | |__- in this macro invocation
2020-10-19T04:59:24.0788767Z      |
2020-10-19T04:59:24.0789069Z      = help: items from traits can only be used if the trait is in scope
2020-10-19T04:59:24.0789609Z      = note: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
2020-10-19T04:59:24.0790313Z              candidate #1: `use crate::scalar::complex::ComplexField;`
2020-10-19T04:59:24.0790775Z              candidate #2: `use crate::num::float::FloatCore;`
2020-10-19T04:59:24.0791159Z              candidate #3: `use crate::num::Float;`
2020-10-19T04:59:24.0791514Z              candidate #4: `use crate::num::real::Real;`
2020-10-19T04:59:24.0792240Z      = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-10-19T04:59:24.0792634Z 
2020-10-19T04:59:24.3187290Z error: aborting due to 2 previous errors
2020-10-19T04:59:24.3187861Z 
2020-10-19T04:59:24.3189441Z For more information about this error, try `rustc --explain E0599`.
2020-10-19T04:59:24.3316594Z error: could not compile `simba`.
2020-10-19T04:59:24.3316921Z 
2020-10-19T04:59:24.3317696Z To learn more, run the command again with --verbose.

closed time in 6 days

astraw

PR opened dimforge/simba

Fix compilation with no-std and libm feature.

This also adds to the CI a compilation with no-std and libm so we can detect this kind of regression earlier. Fix #14

+4 -1

0 comment

2 changed files

pr created time in 6 days

create barnchdimforge/simba

branch : auto_simd_libm

created branch time in 6 days

create barnchdimforge/simba

branch : copysign_argument_order

created branch time in 6 days

pull request commentdimforge/bevy_rapier

Interpolate simulation state at render time

All good, thanks!

superdump

comment created time in 6 days

push eventdimforge/bevy_rapier

Robert Swain

commit sha d5fbb5c3a2676c2514baed757cd84fc6ba831065

Predict simulation state at render time This commit follows the suggestion from: https://www.gafferongames.com/post/fix_your_timestep/ The problem is that the simulation is stepped with a fixed time step, as it should be to maintain simulation stability. However, the time step of each game loop may vary based on external factors to the physics engine. For example, if the timestep is 1/60 but the game loop iterates at a faster rate, then the physics simulation will appear to advance faster than real-time. The idea for the solution is that the renderer / game loop 'produces' time, and the simulation consumes it. As such, a new resource has been added to keep track of the amount of time produced and consumed. It represents how far ahead of the simulation the rendering is. The step_world_system has been modified to add Time.delta_seconds to the SimulationToRenderTime resource, and then if there is more than a time step of time to simulate, we loop through stepping the simulation and subtracting the simulation time step from the resource until there is less than a time step of time remaining to simulate. As noted in the article, if this was all we did then the motion of objects due to physics would look jittery. We have to interpolate the positions and orientations of simulated objects between each simulation step. The sync_transform_system has been modified to predict the position and rotation of each body based on its current position and rotation, linear velocity, and angular velocity. Ideally the linear and angular accelerations would be taken into account but these are not public.

view details

Robert Swain

commit sha dbfe0d525f3b67ea6eaf8f3f8bfb741a4d9addb9

Interpolate between previous and current state when rendering This introduces a physics-step of lag.

view details

Robert Swain

commit sha 70d7f962ab71b6eb5390b0a93a55a76f8b012aba

Add PhysicsInterpolationComponent new impl Using glam types as this will be called from code using Bevy.

view details

Robert Swain

commit sha ea45c89055feda3f8f29c95acc8d9393a249b255

Divide the time diff by the time step for interpolation

view details

Robert Swain

commit sha 39d48862b838af55bba4a32682f0bb09e7663948

Step simulation also if sim to render time is equal time step Co-authored-by: Sébastien Crozet <sebastien@crozet.re>

view details

Robert Swain

commit sha bc7bb6a27033b3cbb905099c6d64df886d3e67e9

Avoid possible float inaccuracy

view details

Sébastien Crozet

commit sha 65d24d3fcb29d7ae42ebc6659ced04bf7a0a485f

Merge pull request #19 from superdump/predict-for-render Interpolate simulation state at render time

view details

push time in 6 days

PR merged dimforge/bevy_rapier

Interpolate simulation state at render time

This commit follows the suggestion from:

https://www.gafferongames.com/post/fix_your_timestep/

The problem is that the simulation is stepped with a fixed time step, as it should be to maintain simulation stability. However, the time step of each game loop may vary based on external factors to the physics engine. For example, if the timestep is 1/60 but the game loop iterates at a faster rate, then the physics simulation will appear to advance faster than real-time.

The idea for the solution is that the renderer / game loop 'produces' time, and the simulation consumes it. As such, a new resource has been added to keep track of the amount of time produced and consumed. It represents how far ahead of the simulation the rendering is.

The step_world_system has been modified to add Time.delta_seconds to the SimulationToRenderTime resource, and then if there is more than a time step of time to simulate, we loop through stepping the simulation and subtracting the simulation time step from the resource until there is less than a time step of time remaining to simulate.

As noted in the article, if this was all we did then the motion of objects due to physics would look jittery. We have to interpolate the positions and orientations of simulated objects between each simulation step. The sync_transform_system has been modified to lerp and slerp the position and rotation of each body based on its previous and current simulation position and rotation.

+119 -44

0 comment

4 changed files

superdump

pr closed time in 6 days

Pull request review commentdimforge/bevy_rapier

Interpolate simulation state at render time

 pub fn create_joints_system(  /// System responsible for performing one timestep of the physics world. pub fn step_world_system(+    (time, mut sim_to_render_time): (Res<Time>, ResMut<SimulationToRenderTime>),     configuration: Res<RapierConfiguration>,     integration_parameters: Res<IntegrationParameters>,-    mut pipeline: ResMut<PhysicsPipeline>,-    mut query_pipeline: ResMut<QueryPipeline>,-    mut broad_phase: ResMut<BroadPhase>,-    mut narrow_phase: ResMut<NarrowPhase>,+    (mut pipeline, mut query_pipeline): (ResMut<PhysicsPipeline>, ResMut<QueryPipeline>),+    (mut broad_phase, mut narrow_phase): (ResMut<BroadPhase>, ResMut<NarrowPhase>),     mut bodies: ResMut<RigidBodySet>,     mut colliders: ResMut<ColliderSet>,     mut joints: ResMut<JointSet>,     events: Res<EventQueue>,+    mut query: Query<(+        &RigidBodyHandleComponent,+        &mut PhysicsInterpolationComponent,+    )>, ) {     if events.auto_clear {         events.clear();     } -    if configuration.physics_pipeline_active {-        pipeline.step(-            &configuration.gravity,-            &integration_parameters,-            &mut broad_phase,-            &mut narrow_phase,-            &mut bodies,-            &mut colliders,-            &mut joints,-            &*events,-        );+    sim_to_render_time.diff += time.delta_seconds;++    let sim_dt = integration_parameters.dt();+    while sim_to_render_time.diff > sim_dt {+        if configuration.physics_pipeline_active {+            if sim_to_render_time.diff < 2.0 * sim_dt {

I think it is best to do the comparison that way:

            // NOTE: in this comparison we do the same computations we
            // will do for the next `while` iteration test, to make sure we
            // don't get bit by potential float inaccuracy.
            if sim_to_render_time.diff - simd_dt < sim_dt {

This ensures we perform the comparison the same way as for the while statement (with the same float operations). That way there is no risk of floating-point errors making this case succeed/fail when we would not expect it to.

superdump

comment created time in 6 days

Pull request review commentdimforge/bevy_rapier

Interpolate simulation state at render time

 pub fn create_joints_system(  /// System responsible for performing one timestep of the physics world. pub fn step_world_system(+    (time, mut sim_to_render_time): (Res<Time>, ResMut<SimulationToRenderTime>),     configuration: Res<RapierConfiguration>,     integration_parameters: Res<IntegrationParameters>,-    mut pipeline: ResMut<PhysicsPipeline>,-    mut query_pipeline: ResMut<QueryPipeline>,-    mut broad_phase: ResMut<BroadPhase>,-    mut narrow_phase: ResMut<NarrowPhase>,+    (mut pipeline, mut query_pipeline): (ResMut<PhysicsPipeline>, ResMut<QueryPipeline>),+    (mut broad_phase, mut narrow_phase): (ResMut<BroadPhase>, ResMut<NarrowPhase>),     mut bodies: ResMut<RigidBodySet>,     mut colliders: ResMut<ColliderSet>,     mut joints: ResMut<JointSet>,     events: Res<EventQueue>,+    mut query: Query<(+        &RigidBodyHandleComponent,+        &mut PhysicsInterpolationComponent,+    )>, ) {     if events.auto_clear {         events.clear();     } -    if configuration.physics_pipeline_active {-        pipeline.step(-            &configuration.gravity,-            &integration_parameters,-            &mut broad_phase,-            &mut narrow_phase,-            &mut bodies,-            &mut colliders,-            &mut joints,-            &*events,-        );+    sim_to_render_time.diff += time.delta_seconds;++    let sim_dt = integration_parameters.dt();+    while sim_to_render_time.diff > sim_dt {

The = case should almost never happen, but if it does we can take one more step:

    while sim_to_render_time.diff >= sim_dt {
superdump

comment created time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

issue commentdimforge/rapier

Regression in performance?

This is not a regression in performance. This was a change of hardware for the benchmark server (a downgrade from an AMD Ryzen 9 to an old Intel Core i7). You will see that the more recent benchmark for at the same commit benchbot@0829ed1 2020/09/26 (you selected the one from 2020/09/13) ran after the change of CPU show the same performances as refs/heads/master@:

image

iMplode-nZ

comment created time in 10 days

push eventdimforge/rapier

Crozet Sébastien

commit sha 8ee3c703d666785207c7db47e3881f2ca9723105

Fix cylinder inertia tensor computation.

view details

Crozet Sébastien

commit sha faf3e7e0f7f2b528da99343f9a3f8ce2b8fa6876

Implement a special case for edge-edge 3D polygonal clipping.

view details

push time in 11 days

delete branch dimforge/nalgebra

delete branch : dot_segfault

delete time in 11 days

push eventdimforge/nalgebra

Crozet Sébastien

commit sha 4da2bfcb717764fb6e97df3ea0e9c168776f2c84

Add missing dot-product dimension check. Fix #776

view details

Sébastien Crozet

commit sha b773fee8972fc7272e7a32cb49b0fae665327c73

Merge pull request #777 from dimforge/dot_segfault Add missing dot-product dimension check.

view details

push time in 11 days

PR merged dimforge/nalgebra

Add missing dot-product dimension check.

Fix #776

+7 -0

0 comment

1 changed file

sebcrozet

pr closed time in 11 days

issue closeddimforge/nalgebra

Segmentation fault when doing dot product of DMatrix

Hello,

I was comparing the performance between ndarray and nalgebra and ran into a problem.

gist code: https://gist.github.com/0045efd5c1d490ddb557ebbfc54b4993 rust playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0045efd5c1d490ddb557ebbfc54b4993

The same happens when running locally with cargo build.

Am I doing something wrong, or is there a bug when running the dot product in this particular way?

closed time in 11 days

TimothyBergstrom

push eventdimforge/nalgebra

Crozet Sébastien

commit sha 4da2bfcb717764fb6e97df3ea0e9c168776f2c84

Add missing dot-product dimension check. Fix #776

view details

push time in 11 days

PR opened dimforge/nalgebra

Add missing dot-product dimension check.

Fix #776

+7 -0

0 comment

1 changed file

pr created time in 11 days

create barnchdimforge/nalgebra

branch : dot_segfault

created branch time in 11 days

issue commentdimforge/nalgebra

Segmentation fault when doing dot product of DMatrix

Hi! This is a bug.

nalgebra should panic with a dimension mismatch error instead of segfaulting. Also keep in mind that dot does not have the same meaning in nalgebra and ndarrays. In ndarrays, dot between two Array2 represents matrix multiplication, while in nalgebra it always represents the scalar product (aka. the vector dot product).

So you should compare x.dot(&y); from ndarrays, to &x * &y from nalgebra.

TimothyBergstrom

comment created time in 11 days

created tagdimforge/nalgebra

tagv0.22.1

Linear algebra library for Rust.

created time in 12 days

push eventdimforge/nalgebra

Crozet Sébastien

commit sha 07dc799bbd840c114e352be9dcb52795263fdad3

Release v0.22.1

view details

push time in 12 days

push eventdimforge/nalgebra

Crozet Sébastien

commit sha 343fb2f24f1486ec01fb70c1b415de1d9544e470

Ensure Isometry implements Copy when targeting no-std. Fix #774.

view details

Sébastien Crozet

commit sha 664d6fc129aca92fa7bb9d6ee175db6bf43a50fb

Merge pull request #775 from dimforge/no_std_isometry_copy Ensure Isometry implements Copy when targeting no-std.

view details

push time in 12 days

issue closeddimforge/nalgebra

Copy not implemented on types without `std` feature

In nalgebra 0.22.0, IsometryMatrix3<f64> no longer implements Copy only when the std feature is not present. When it is present, Copy is implemented. This has created a downstream issue in Rust CV cv-core.

Here is a minimal test case:

[dependencies]
nalgebra = { version = "0.22.0", default-features = false }
use nalgebra::IsometryMatrix3;

#[derive(Debug, Clone, Copy)]
struct A(pub IsometryMatrix3<f64>);

fn main() {}

closed time in 12 days

vadixidav

PR opened dimforge/nalgebra

Ensure Isometry implements Copy when targeting no-std.

Fix #774.

+18 -4

0 comment

2 changed files

pr created time in 12 days

create barnchdimforge/nalgebra

branch : no_std_isometry_copy

created branch time in 12 days

issue commentdimforge/nalgebra

Copy not implemented on types without `std` feature

In nalgebra 0.22.0, the use of libm when targeting no-std becomes opt-in. So enabling the libm feature of nalgebra is needed if you want to use IsometryMatrix3 in any useful way (because without libm you won't have any trigonometric functions available).

That being said, I don't see any reasons why IsometryMatrix3 would require libm to implement Copy itself. So we can consider this a regression that can be fixed by removing the AbstractRotation bound from the Copy trait implementation.

vadixidav

comment created time in 12 days

create barnchdimforge/rapier

branch : cylinder

created branch time in 12 days

issue commentdimforge/bevy_rapier

ColliderBuilder::trimesh() panics

I guess you are using the RapierRenderPlugin. It only supports cuboids a balls right now. That's why you are having this unimplemented panic. Since you seem to be able to provide your own graphic mesh, you should not use the RapierRenderPlugin and spawn your own PbrComponents like you did.

Nickan

comment created time in 12 days

pull request commentdimforge/nalgebra

Random cleanups

Thanks!

filnet

comment created time in 13 days

push eventdimforge/nalgebra

Philippe Renon

commit sha fb15658cc977d992db2ebd6c1549292611375e87

fix typo: apsect should be aspect

view details

Philippe Renon

commit sha 6293d3375bb0095c0ba7fb89fa78c340f378ccfd

clippy: fix #redundant_field_names

view details

Philippe Renon

commit sha 1624a87efa9eab6d6a996ffde0da507074b7e805

clippy: fix #needless_return

view details

Philippe Renon

commit sha 0b0f248267e3822fe40878e783e49de636c0eac7

clippy: fix #identity_op

view details

Philippe Renon

commit sha 822f114254652c6744d6404f9cd194c80095db65

perspective: fix copy/paste error

view details

Sébastien Crozet

commit sha 81d2cbf96cfbba523074192f17e256121ca75777

Merge pull request #772 from filnet/random_cleanups Random cleanups

view details

push time in 13 days

PR merged dimforge/nalgebra

Random cleanups
+39 -59

0 comment

18 changed files

filnet

pr closed time in 13 days

issue commentdimforge/nalgebra

convert RealField to f64

Hi! You can use nalgebra::try_convert for the RealField -> f64 conversion. Relying on Into and TryInto would not be versatile enough because of Rust orphan rules.

astraw

comment created time in 13 days

Pull request review commentdimforge/rapier

Add wake_up parameter to rigidbody methods

 impl RigidBody {      * Application of forces/impulses.      */     /// Applies a force at the center-of-mass of this rigid-body.-    pub fn apply_force(&mut self, force: Vector<f32>) {+    pub fn apply_force(&mut self, force: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.linacc += force * self.mass_properties.inv_mass;         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulse at the center-of-mass of this rigid-body.-    pub fn apply_impulse(&mut self, impulse: Vector<f32>) {+    pub fn apply_impulse(&mut self, impulse: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.linvel += impulse * self.mass_properties.inv_mass;         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim2")]-    pub fn apply_torque(&mut self, torque: f32) {+    pub fn apply_torque(&mut self, torque: f32, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angacc += self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim3")]-    pub fn apply_torque(&mut self, torque: Vector<f32>) {+    pub fn apply_torque(&mut self, torque: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angacc += self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulsive torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim2")]-    pub fn apply_torque_impulse(&mut self, torque_impulse: f32) {+    pub fn apply_torque_impulse(&mut self, torque_impulse: f32, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angvel +=                 self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque_impulse);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulsive torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim3")]-    pub fn apply_torque_impulse(&mut self, torque_impulse: Vector<f32>) {+    pub fn apply_torque_impulse(&mut self, torque_impulse: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angvel +=                 self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque_impulse);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a force at the given world-space point of this rigid-body.-    pub fn apply_force_at_point(&mut self, force: Vector<f32>, point: Point<f32>) {+    pub fn apply_force_at_point(&mut self, force: Vector<f32>, point: Point<f32>, wake_up: bool) {         let torque = (point - self.world_com).gcross(force);-        self.apply_force(force);-        self.apply_torque(torque);+        self.apply_force(force, false);+        self.apply_torque(torque, false);++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulse at the given world-space point of this rigid-body.-    pub fn apply_impulse_at_point(&mut self, impulse: Vector<f32>, point: Point<f32>) {+    pub fn apply_impulse_at_point(+        &mut self,+        impulse: Vector<f32>,+        point: Point<f32>,+        wake_up: bool,+    ) {         let torque_impulse = (point - self.world_com).gcross(impulse);-        self.apply_impulse(impulse);-        self.apply_torque_impulse(torque_impulse);+        self.apply_impulse(impulse, false);+        self.apply_torque_impulse(torque_impulse, false);++        if wake_up {+            self.wake_up(false);+        }
        self.apply_impulse(impulse, wake_up);
        self.apply_torque_impulse(torque_impulse, wake_up);

Same remark as before.

robert-hrusecky

comment created time in 13 days

Pull request review commentdimforge/rapier

Add wake_up parameter to rigidbody methods

 impl RigidBody {      * Application of forces/impulses.      */     /// Applies a force at the center-of-mass of this rigid-body.-    pub fn apply_force(&mut self, force: Vector<f32>) {+    pub fn apply_force(&mut self, force: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.linacc += force * self.mass_properties.inv_mass;         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulse at the center-of-mass of this rigid-body.-    pub fn apply_impulse(&mut self, impulse: Vector<f32>) {+    pub fn apply_impulse(&mut self, impulse: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.linvel += impulse * self.mass_properties.inv_mass;         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim2")]-    pub fn apply_torque(&mut self, torque: f32) {+    pub fn apply_torque(&mut self, torque: f32, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angacc += self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim3")]-    pub fn apply_torque(&mut self, torque: Vector<f32>) {+    pub fn apply_torque(&mut self, torque: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angacc += self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulsive torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim2")]-    pub fn apply_torque_impulse(&mut self, torque_impulse: f32) {+    pub fn apply_torque_impulse(&mut self, torque_impulse: f32, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angvel +=                 self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque_impulse);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies an impulsive torque at the center-of-mass of this rigid-body.     #[cfg(feature = "dim3")]-    pub fn apply_torque_impulse(&mut self, torque_impulse: Vector<f32>) {+    pub fn apply_torque_impulse(&mut self, torque_impulse: Vector<f32>, wake_up: bool) {         if self.body_status == BodyStatus::Dynamic {             self.angvel +=                 self.world_inv_inertia_sqrt * (self.world_inv_inertia_sqrt * torque_impulse);         }++        if wake_up {+            self.wake_up(false);+        }     }      /// Applies a force at the given world-space point of this rigid-body.-    pub fn apply_force_at_point(&mut self, force: Vector<f32>, point: Point<f32>) {+    pub fn apply_force_at_point(&mut self, force: Vector<f32>, point: Point<f32>, wake_up: bool) {         let torque = (point - self.world_com).gcross(force);-        self.apply_force(force);-        self.apply_torque(torque);+        self.apply_force(force, false);+        self.apply_torque(torque, false);++        if wake_up {+            self.wake_up(false);+        }
        self.apply_force(force, wake_up);
        self.apply_torque(torque, wake_up);

I understand the approach you took was to avoid making two wake up calls. But this should not have any noticeable performance impact, so passing the wake_up parameter will keep things easier to maintain.

robert-hrusecky

comment created time in 13 days

PullRequestReviewEvent
PullRequestReviewEvent
more