Skip to content

Commit

Permalink
fix small API regression
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Dec 16, 2024
1 parent 82a26b6 commit 9c45e74
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ jobs:
rustup default nightly
rustup component add rustfmt
cargo fmt
cargo doc --no-deps --all-features
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sophus-rs builds on stable.

```toml
[dependencies]
sophus = "0.9.0"
sophus = "0.11.0"
```

To allow for batch types, such as BatchScalarF64, the 'simd' feature is required. This feature
Expand All @@ -38,5 +38,5 @@ are no plans to rely on any other nightly features.

```toml
[dependencies]
sophus = { version = "0.9.0", features = ["simd"] }
sophus = { version = "0.11.0", features = ["simd"] }
```
1 change: 0 additions & 1 deletion crates/sophus_image/src/color_map.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use sophus_core::linalg::SVec;

/// blue to white to red to black
pub struct BlueWhiteRedBlackColorMap;

impl BlueWhiteRedBlackColorMap {
Expand Down
18 changes: 18 additions & 0 deletions crates/sophus_lie/src/groups/isometry3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ impl<S: IsScalar<BATCH>, const BATCH: usize> Isometry3<S, BATCH> {
Self::from_rotation(Rotation3::rot_x(theta))
}

/// Rotate by angle
pub fn rot_y<U>(theta: U) -> Self
where
U: Borrow<S>,
{
let theta: &S = theta.borrow();
Self::from_rotation(Rotation3::rot_y(theta))
}

/// Rotate by angle
pub fn rot_z<U>(theta: U) -> Self
where
U: Borrow<S>,
{
let theta: &S = theta.borrow();
Self::from_rotation(Rotation3::rot_z(theta))
}

/// set rotation
pub fn set_rotation<F>(&mut self, rotation: F)
where
Expand Down
8 changes: 4 additions & 4 deletions crates/sophus_renderer/src/scene_renderer/distortion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ impl DistortionRenderer {
compute_pass.set_bind_group(0, &self.uniforms.compute_bind_group, &[]);

compute_pass.dispatch_workgroups(
(view_port_size.width as u32 + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE,
(view_port_size.height as u32 + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE,
(view_port_size.width as u32).div_ceil(WORKGROUP_SIZE),
(view_port_size.height as u32).div_ceil(WORKGROUP_SIZE),
1,
);
}
Expand All @@ -282,8 +282,8 @@ impl DistortionRenderer {
compute_pass.set_bind_group(0, &self.uniforms.compute_bind_group, &[]);

compute_pass.dispatch_workgroups(
(view_port_size.width as u32 + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE,
(view_port_size.height as u32 + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE,
(view_port_size.width as u32).div_ceil(WORKGROUP_SIZE),
(view_port_size.height as u32).div_ceil(WORKGROUP_SIZE),
1,
);
}
Expand Down

0 comments on commit 9c45e74

Please sign in to comment.