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 72df9ce
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 45 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/docs.yml

This file was deleted.

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
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ jobs:
run: ${SCCACHE_PATH} --show-stats
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2024-12-01
- uses: extractions/setup-just@v1
- name: cargo build
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
run: |
rustup default nightly
rustup default nightly-2024-12-01
cargo build --release --all-targets --all-features
- name: cargo test
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
run: |
rustup default nightly-2024-12-01
just test
- name: Run sccache stat for check after
shell: bash
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/clippy.yml → .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,22 @@ jobs:
run: ${SCCACHE_PATH} --show-stats
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-09-01
toolchain: nightly-2024-12-01
- name: cargo clippy
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
run: |
rustup default nightly-2024-09-01
rustup default nightly-2024-12-01
rustup component add clippy
cargo clippy --all-targets --all-features
- name: cargo docs
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
run: |
rustup default nightly-2024-12-01
cargo doc --no-deps --all-features
- name: Run sccache stat for check after
shell: bash
run: ${SCCACHE_PATH} --show-stats
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 72df9ce

Please sign in to comment.