Skip to content

Commit

Permalink
opt: variadic macro for MakeTerm
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Dec 7, 2024
1 parent 750526a commit bcdcfae
Show file tree
Hide file tree
Showing 23 changed files with 178 additions and 347 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
toolchain: nightly-2024-09-01
- name: cargo doc
run: |
rustup default nightly-2024-09-01
cargo doc --no-deps --all-features
cargo +nightly fmt
cargo +nightly doc --no-deps --all-features
12 changes: 6 additions & 6 deletions crates/sophus/examples/camera_sim.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#![cfg(feature = "std")]

use sophus::lie::Isometry3;
use sophus::prelude::IsImageView;
use sophus::sim::camera_simulator::CameraSimulator;
use sophus_image::io::png::save_as_png;
use sophus_image::io::tiff::save_as_tiff;
use sophus_image::ImageSize;
use sophus_renderer::camera::properties::RenderCameraProperties;
use sophus_renderer::renderables::color::Color;
use sophus_renderer::renderables::scene_renderable::make_line3;
use sophus_renderer::renderables::scene_renderable::make_mesh3_at;
use sophus_renderer::renderables::scene_renderable::make_point3;
use sophus_renderer::RenderContext;
use sophus::sim::camera_simulator::CameraSimulator;
use sophus_image::io::png::save_as_png;
use sophus_image::io::tiff::save_as_tiff;
use sophus_image::ImageSize;
use sophus::lie::Isometry3;
use sophus::prelude::IsImageView;

pub async fn run_offscreen() {
let render_state = RenderContext::new().await;
Expand Down
18 changes: 9 additions & 9 deletions crates/sophus/examples/viewer_ex.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#![cfg(feature = "std")]

use core::f64::consts::TAU;
use sophus::core::linalg::VecF64;
use sophus::examples::viewer_example::make_distorted_frame;
use sophus::lie::prelude::IsVector;
use sophus::lie::Isometry3;
use sophus::sensor::dyn_camera::DynCameraF64;
use sophus_image::intensity_image::intensity_arc_image::IsIntensityArcImage;
use sophus_image::mut_image::MutImageF32;
use sophus_image::mut_image_view::IsMutImageView;
use sophus_image::ImageSize;
use sophus_renderer::camera::clipping_planes::ClippingPlanes;
use sophus_renderer::camera::properties::RenderCameraProperties;
use sophus_renderer::camera::RenderCamera;
Expand All @@ -13,15 +21,6 @@ use sophus_renderer::renderables::scene_renderable::make_line3;
use sophus_renderer::renderables::scene_renderable::make_mesh3_at;
use sophus_renderer::renderables::scene_renderable::make_point3;
use sophus_renderer::RenderContext;
use sophus::core::linalg::VecF64;
use sophus_image::intensity_image::intensity_arc_image::IsIntensityArcImage;
use sophus_image::mut_image::MutImageF32;
use sophus_image::mut_image_view::IsMutImageView;
use sophus_image::ImageSize;
use sophus::lie::prelude::IsVector;
use sophus::lie::Isometry3;
use sophus::sensor::dyn_camera::DynCameraF64;
use thingbuf::mpsc::blocking::channel;
use sophus_viewer::packets::append_to_scene_packet;
use sophus_viewer::packets::create_scene_packet;
use sophus_viewer::packets::image_view_packet::ImageViewPacket;
Expand All @@ -34,6 +33,7 @@ use sophus_viewer::packets::plot_view_packet::PlotViewPacket;
use sophus_viewer::packets::Packet;
use sophus_viewer::simple_viewer::SimpleViewer;
use std::thread::spawn;
use thingbuf::mpsc::blocking::channel;

fn create_distorted_image_packet() -> Packet {
let mut image_packet = ImageViewPacket {
Expand Down
4 changes: 2 additions & 2 deletions crates/sophus/src/examples/viewer_example.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use sophus_renderer::camera::properties::RenderCameraProperties;
use sophus_renderer::renderables::frame::ImageFrame;
use sophus_core::linalg::SVec;
use sophus_core::linalg::VecF64;
use sophus_core::prelude::IsVector;
use sophus_image::arc_image::ArcImage4U8;
use sophus_image::mut_image::MutImage4U8;
use sophus_image::mut_image_view::IsMutImageView;
use sophus_image::ImageSize;
use sophus_renderer::camera::properties::RenderCameraProperties;
use sophus_renderer::renderables::frame::ImageFrame;
use sophus_sensor::dyn_camera::DynCameraF64;

/// Makes example image of image-size
Expand Down
5 changes: 2 additions & 3 deletions crates/sophus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ pub use sophus_lie as lie;
#[doc(inline)]
pub use sophus_opt as opt;
#[doc(inline)]
pub use sophus_sensor as sensor;
#[doc(inline)]
pub use sophus_renderer as renderer;
#[doc(inline)]
pub use sophus_sensor as sensor;
#[doc(inline)]
pub use sophus_sim as sim;
#[doc(inline)]
pub use sophus_viewer as viewer;
Expand All @@ -23,7 +23,6 @@ pub mod examples;
pub use eframe;
pub use thingbuf;


pub use nalgebra;
pub use ndarray;

Expand Down
Loading

0 comments on commit bcdcfae

Please sign in to comment.