cargo fix

This commit is contained in:
Matthieu Baumann
2023-07-28 11:17:22 +02:00
parent a2a09c7506
commit 9ef1f2ac09
30 changed files with 117 additions and 205 deletions

4
.gitignore vendored
View File

@@ -8,4 +8,6 @@ package-lock.json
src/core/target/
src/core/Cargo.lock
AladinLiteAssets.tar.gz
aladin-lite-3.1.0.tgz
.vscode

View File

@@ -10,10 +10,10 @@
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {projection: "TAN", target: '15 16 57.636 -60 55 7.49', showCooGrid: true, fov: 90, fullScreen: true});
var moc_0_99 = A.MOCFromURL("./gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.7, lineWidth: 5, perimeter: true, fillColor: "#00ff00", adaptativeDisplay: true});
var moc_0_95 = A.MOCFromURL("./gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.8, lineWidth: 1, adaptativeDisplay: true});
var moc_0_5 = A.MOCFromURL("./gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 1.0, lineWidth: 1, adaptativeDisplay: true});
var moc_0_2 = A.MOCFromURL("./gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 1.0, lineWidth: 1, adaptativeDisplay: true});
var moc_0_99 = A.MOCFromURL("./gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.7, lineWidth: 5, perimeter: true});
var moc_0_95 = A.MOCFromURL("./gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.8, lineWidth: 5, perimeter: true});
var moc_0_5 = A.MOCFromURL("./gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 1.0, lineWidth: 5, perimeter: true});
var moc_0_2 = A.MOCFromURL("./gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 1.0, lineWidth: 5, perimeter: true});
aladin.addMOC(moc_0_99);
aladin.addMOC(moc_0_95);

View File

@@ -18,7 +18,7 @@ use crate::{
tile_fetcher::TileFetcherQueue,
time::DeltaTime,
};
use al_core::{info, inforec, log};
use wasm_bindgen::prelude::*;
use al_core::colormap::{Colormap, Colormaps};
@@ -29,7 +29,7 @@ use crate::Abort;
use al_api::{
coo_system::CooSystem,
grid::GridCfg,
hips::{self, FITSCfg, HiPSCfg, ImageMetadata},
hips::{FITSCfg, HiPSCfg, ImageMetadata},
};
use cgmath::Vector4;
use fitsrs::{fits::AsyncFits, hdu::extension::AsyncXtensionHDU};
@@ -80,7 +80,7 @@ pub struct App {
dragging: bool,
prev_cam_position: Vector3<f64>,
prev_center: Vector3<f64>,
//prev_center: Vector3<f64>,
out_of_fov: bool,
//tasks_finished: bool,
catalog_loaded: bool,
@@ -175,7 +175,7 @@ impl App {
let request_redraw = false;
let rendering = true;
let prev_cam_position = camera.get_center().truncate();
let prev_center = Vector3::new(0.0, 1.0, 0.0);
//let prev_center = Vector3::new(0.0, 1.0, 0.0);
let out_of_fov = false;
let catalog_loaded = false;
@@ -226,8 +226,7 @@ impl App {
// The catalog renderable
manager,
exec,
prev_center,
//prev_center,
_fbo_view,
_fbo_ui,
_final_rendering_pass,
@@ -567,7 +566,7 @@ impl App {
//let has_camera_recently_moved =
// ;
let has_camera_zoomed = self.camera.has_zoomed();
let _has_camera_zoomed = self.camera.has_zoomed();
{
// Newly available tiles must lead to
// 1. Surveys must be aware of the new available tiles
@@ -578,8 +577,8 @@ impl App {
.get_resolved_tiles(/*&available_tiles, */&mut self.surveys);*/
let rscs_received = self.downloader.get_received_resources();
let mut num_tile_handled = 0;
let mut tile_copied = false;
let _num_tile_handled = 0;
let _tile_copied = false;
for rsc in rscs_received {
match rsc {
Resource::Tile(tile) => {
@@ -601,7 +600,7 @@ impl App {
});
let is_tile_root = tile.cell().depth() == delta_depth;
let depth = tile.cell().depth();
let _depth = tile.cell().depth();
//al_core::info!("is root tile", depth, is_tile_root);
// do not perform tex_sub costly GPU calls while the camera is zooming
if is_tile_root || included_or_near_coverage {
@@ -655,7 +654,7 @@ impl App {
// The allsky image is missing so we donwload all the tiles contained into
// the 0's cell
let cfg = survey.get_config();
let delta_depth = cfg.delta_depth();
let _delta_depth = cfg.delta_depth();
let hips_url = cfg.get_root_url();
let format = cfg.get_format();
for texture_cell in crate::healpix::cell::ALLSKY_HPX_CELLS_D0 {
@@ -1382,7 +1381,7 @@ impl App {
}
}
pub(crate) fn press_left_button_mouse(&mut self, sx: f32, sy: f32) {
pub(crate) fn press_left_button_mouse(&mut self, _sx: f32, _sy: f32) {
self.dist_dragging = 0.0;
self.time_start_dragging = Time::now();
self.dragging = true;
@@ -1396,7 +1395,7 @@ impl App {
self.request_for_new_tiles = true;
self.dragging = false;
let cur_mouse_pos = [sx, sy];
let _cur_mouse_pos = [sx, sy];
// Check whether the center has moved
// between the pressing and releasing
@@ -1427,7 +1426,7 @@ impl App {
let dragging_duration = (now - self.time_start_dragging).as_secs();
let dragging_vel = self.dist_dragging / dragging_duration;
let dist_dragging = self.dist_dragging;
let _dist_dragging = self.dist_dragging;
// Detect if there has been a recent acceleration
// It is also possible that the dragging time is too short and if it is the case, trigger the inertia
let recent_acceleration = (Time::now() - self.time_mouse_high_vel).as_secs() < 0.1

View File

@@ -1,23 +1,14 @@
use crate::healpix::cell::HEALPixCell;
use crate::healpix::cell::MAX_HPX_DEPTH;
use crate::{coosys, healpix::cell::HEALPixCell};
use std::collections::HashMap;
use crate::camera::XYZWModel;
use crate::math::angle::Angle;
use crate::math::angle::ToAngle;
use crate::math::projection::coo_space::XYScreen;
use crate::math::projection::*;
use crate::renderable::utils::Triangle;
use crate::HEALPixCoverage;
use crate::LonLatT;
use cgmath::Vector2;
use wasm_bindgen::JsValue;
use crate::math::lonlat::LonLat;
use std::ops::Range;
use al_core::{info, inforec, log};
use al_api::cell::HEALPixCellProjeted;
pub fn project(
@@ -67,8 +58,6 @@ pub fn project(
}
}
use crate::healpix;
pub(super) struct ViewHpxCells {
hpx_cells: [HpxCells; NUM_COOSYSTEM],
reg_frames: [u8; NUM_COOSYSTEM],
@@ -174,7 +163,6 @@ impl Default for HpxCells {
use crate::camera::CameraViewPort;
use al_api::coo_system::{CooSystem, NUM_COOSYSTEM};
use moclib::moc::range::RangeMOC;
use super::FieldOfView;
impl HpxCells {
@@ -227,8 +215,6 @@ impl HpxCells {
self.idx_rng[camera_depth as usize] = Some(num_past..num_cur);
}
fn append_depth_cells(&mut self, cells_iter: impl Iterator<Item = HEALPixCell>, depth: u8) {}
// Accessors
// depth MUST be < to camera tile depth
pub fn get_cells<'a>(&'a mut self, depth: u8) -> impl Iterator<Item = &'a HEALPixCell> {
@@ -253,14 +239,16 @@ impl HpxCells {
self.cells[start..end].iter()
}
/*
#[inline(always)]
pub fn num_of_cells(&self, depth: u8) -> usize {
if let Some(rng) = &self.idx_rng[depth as usize] {
rng.end - rng.start
} else {
0
pub fn num_of_cells(&self, depth: u8) -> usize {
if let Some(rng) = &self.idx_rng[depth as usize] {
rng.end - rng.start
} else {
0
}
}
}
*/
/*#[inline]
pub fn get_depth(&self) -> u8 {

View File

@@ -6,12 +6,12 @@ pub enum UserAction {
Starting = 4,
}
use super::view_hpx_cells::HpxCells;
use super::{fov::FieldOfView, view_hpx_cells::ViewHpxCells};
use crate::healpix::cell::HEALPixCell;
use crate::healpix::coverage::HEALPixCoverage;
use crate::math::{projection::coo_space::XYZWModel, projection::domain::sdf::ProjDef};
use al_api::coo_system::NUM_COOSYSTEM;
use cgmath::{Matrix4, Vector2};
pub struct CameraViewPort {

View File

@@ -4,8 +4,6 @@ pub mod request;
use crate::renderable::Url;
use std::collections::HashSet;
use al_core::{info, inforec, log};
use query::QueryId;
pub struct Downloader {
@@ -102,10 +100,6 @@ impl Downloader {
self.cache.insert(rsc.url().clone(), rsc);
}*/
pub fn is_cached(&mut self, url: &Url) -> bool {
self.cache.contains(url)
}
pub fn delay_rsc(&mut self, rsc: Resource) {
self.queried_cached_urls.push(rsc.url().clone());
self.cache.insert(rsc.url().clone(), rsc);

View File

@@ -9,7 +9,7 @@ use crate::ProjectionType;
use crate::grid::angle::SerializeFmt;
use crate::math::HALF_PI;
use al_core::{info, inforec, log};
pub fn get_intersecting_meridian(
lon: f64,

View File

@@ -4,7 +4,7 @@ pub mod parallel;
use crate::math::projection::coo_space::XYScreen;
use crate::Abort;
use al_core::{info, inforec, log};
use crate::camera::CameraViewPort;
use crate::math::angle;

View File

@@ -1,4 +1,3 @@
use al_core::{info, inforec, log};
use std::cmp::Ordering;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
@@ -16,9 +15,7 @@ use healpix::compass_point::Cardinal;
use healpix::compass_point::MainWind;
use healpix::compass_point::Ordinal;
use healpix::compass_point::OrdinalMap;
use healpix::compass_point::OrdinalSet;
use crate::survey::config::HiPSConfig;
use crate::utils;
use crate::Abort;
impl HEALPixCell {
@@ -90,7 +87,7 @@ impl HEALPixCell {
}
#[inline(always)]
pub fn is_root(&self, delta_depth_to_texture: u8) -> bool {
pub fn is_root(&self, _delta_depth_to_texture: u8) -> bool {
self.depth() == 0
}
@@ -145,7 +142,7 @@ impl HEALPixCell {
smallest_ancestor
}
(None, Some(c2)) => {
(None, Some(_c2)) => {
// cannot happen as there must be a first cell before any second one
// property of iterator
unreachable!();
@@ -465,6 +462,7 @@ impl Ord for HEALPixCell {
}
}
#[test]
mod tests {
use super::HEALPixCell;

View File

@@ -1,7 +1,7 @@
use crate::math;
use crate::math::lonlat::LonLatT;
use crate::math::PI;
use al_core::{info, inforec, log};
use cgmath::{Vector3, Vector4};
use moclib::{moc::range::RangeMOC, qty::Hpx, ranges::SNORanges};
pub type Smoc = RangeMOC<u64, Hpx<u64>>;
@@ -10,7 +10,7 @@ use crate::healpix::cell::HEALPixCell;
#[derive(Clone, Debug)]
pub struct HEALPixCoverage(pub Smoc);
use moclib::elemset::range::MocRanges;
impl HEALPixCoverage {
pub fn from_3d_coos<'a>(
// The depth of the smallest HEALPix cells contained in it

View File

@@ -1,10 +1,7 @@
use cgmath::BaseFloat;
use crate::{
healpix::cell::HEALPixCell,
math::sph_geom::great_circle_arc::{GreatCircleArc, HEALPixBBox},
};
use al_core::{info, inforec, log};
use std::ops::Range;
#[derive(Debug)]
@@ -67,11 +64,7 @@ impl IdxVec {
}
// Create an index vector from a list of segments
pub fn from_great_circle_arc<T1, T2>(arcs: &mut [GreatCircleArc<f32, T1, T2>]) -> Self
where
T1: LonLat<f32>,
T2: LonLat<f32>,
{
pub fn from_great_circle_arc(arcs: &mut [GreatCircleArc]) -> Self {
arcs.sort_unstable_by(|a1, a2| {
let bbox1 = a1.get_containing_hpx_cell();
let bbox2 = a2.get_containing_hpx_cell();

View File

@@ -942,9 +942,9 @@ impl WebClient {
#[wasm_bindgen(js_name = mocContains)]
pub fn moc_contains(
&mut self,
params: &al_api::moc::MOC,
lon: f64,
lat: f64,
_params: &al_api::moc::MOC,
_lon: f64,
_lat: f64,
) -> Result<bool, JsValue> {
/*let moc = self.app.get_moc(params).ok_or_else(|| JsValue::from(js_sys::Error::new("MOC not found")))?;
let location = LonLatT::new(ArcDeg(lon).into(), ArcDeg(lat).into());
@@ -954,7 +954,7 @@ impl WebClient {
}
#[wasm_bindgen(js_name = mocSkyFraction)]
pub fn moc_sky_fraction(&mut self, params: &al_api::moc::MOC) -> Result<f32, JsValue> {
pub fn moc_sky_fraction(&mut self, _params: &al_api::moc::MOC) -> Result<f32, JsValue> {
//let moc = self.app.get_moc(params).ok_or_else(|| JsValue::from(js_sys::Error::new("MOC not found")))?;
//Ok(moc.coverage_percentage() as f32)

View File

@@ -350,7 +350,7 @@ impl ProjectionType {
ProjectionType::Sin(_)
| ProjectionType::Tan(_)
| ProjectionType::Feye(_)
| ProjectionType::Feye(_) => false,
| ProjectionType::Ncp(_) => false,
_ => true,
}
}

View File

@@ -1,14 +1,14 @@
use crate::healpix::cell::MAX_HPX_DEPTH;
use crate::{healpix::cell::HEALPixCell, math::lonlat::LonLat};
use al_api::Abort;
use cgmath::BaseFloat;
use crate::{math::lonlat::LonLat, healpix::cell::HEALPixCell};
use crate::healpix::cell::MAX_HPX_DEPTH;
use std::cmp::{Ord, Ordering};
#[derive(PartialEq, Eq)]
pub enum HEALPixBBox {
AllSky,
Cell(HEALPixCell)
Cell(HEALPixCell),
}
impl PartialOrd for HEALPixBBox {
@@ -28,26 +28,18 @@ impl Ord for HEALPixBBox {
}
}
pub struct GreatCircleArc<S, T, U>
where
S: BaseFloat,
T: LonLat<S>,
U: LonLat<S>
{
v1: T,
v2: U,
pub struct GreatCircleArc {
/// Smallest HEALPix cell containing the arc
hpx_bbox: HEALPixBBox,
phantom: std::marker::PhantomData<S>
}
impl<S, T, U> GreatCircleArc<S, T, U>
where
S: BaseFloat,
T: LonLat<S>,
U: LonLat<S>
{
pub fn new(v1: T, v2: U) -> Self {
impl GreatCircleArc {
pub fn new<S, T, U>(v1: T, v2: U) -> Self
where
S: BaseFloat,
T: LonLat<S>,
U: LonLat<S>,
{
// Compute the HPX bbox
let lonlat1 = v1.lonlat();
let lonlat2 = v2.lonlat();
@@ -55,12 +47,12 @@ where
let c1 = HEALPixCell::new(
MAX_HPX_DEPTH,
lonlat1.lon().to_radians().to_f64().unwrap_abort(),
lonlat1.lat().to_radians().to_f64().unwrap_abort()
lonlat1.lat().to_radians().to_f64().unwrap_abort(),
);
let c2 = HEALPixCell::new(
MAX_HPX_DEPTH,
lonlat2.lon().to_radians().to_f64().unwrap_abort(),
lonlat2.lat().to_radians().to_f64().unwrap_abort()
lonlat2.lat().to_radians().to_f64().unwrap_abort(),
);
let hpx_bbox = if let Some(common_ancestor) = c1.smallest_common_ancestor(&c2) {
@@ -69,7 +61,7 @@ where
HEALPixBBox::AllSky
};
Self { v1, v2, hpx_bbox, phantom: std::marker::PhantomData }
Self { hpx_bbox }
}
pub fn get_containing_hpx_cell(&self) -> &HEALPixBBox {

View File

@@ -7,7 +7,7 @@ use healpix::sph_geom::ContainsSouthPoleMethod;
use healpix::sph_geom::Polygon;
use mapproj::math::HALF_PI;
use al_core::{info, inforec, log};
pub enum Region {
AllSky,

View File

@@ -65,7 +65,7 @@ impl NormedVector2 {
}
}
use std::borrow::Borrow;
use std::ops::Deref;
impl Deref for NormedVector2 {
type Target = Vector2<f64>;

View File

@@ -1,6 +1,6 @@
use crate::ShaderManager;
use al_api::coo_system;
use al_api::coo_system::CooSystem;
use al_api::resources::Resources;
@@ -11,7 +11,7 @@ use al_core::{Texture2D, VecData, VertexArrayObject, WebGlContext};
use crate::ProjectionType;
use std::collections::HashMap;
use std::iter::FromIterator;
use web_sys::WebGl2RenderingContext;
#[derive(Debug)]
@@ -267,7 +267,7 @@ use crate::healpix::cell::HEALPixCell;
use crate::{camera::CameraViewPort, math::projection::Projection, utils};
use al_core::SliceData;
use cgmath::Vector2;
use std::collections::HashSet;
const MAX_SOURCES_PER_CATALOG: f32 = 50000.0;
use crate::Abort;

View File

@@ -1,16 +1,15 @@
use crate::healpix::coverage::HEALPixCoverage;
use al_core::{info, inforec, log};
use al_core::{inforec, log};
use moclib::elem::cell::Cell;
use moclib::moc::range::CellAndNeighs;
use moclib::moc::RangeMOCIntoIterator;
use moclib::moc::RangeMOCIterator;
use web_sys::Node;
use crate::renderable::coverage::HEALPixCell;
use healpix::{
compass_point::{Cardinal, MainWind, Ordinal, OrdinalMap, OrdinalSet},
nested::moc::HpxCell,
compass_point::{MainWind, Ordinal},
};
#[derive(Debug)]
pub(super) struct EdgeNeigs {

View File

@@ -1,7 +1,6 @@
use super::moc::{RenderModeType, MOC};
use super::moc::MOC;
use crate::{camera::CameraViewPort, HEALPixCoverage};
use al_api::moc::MOC as Cfg;
use al_core::{info, inforec, log};
pub struct MOCHierarchy {
full_res_depth: u8,
@@ -29,14 +28,11 @@ impl MOCHierarchy {
const MAX_NUM_CELLS_TO_DRAW: usize = 1500;
let mut d = self.full_res_depth as usize;
let mut num_cells = MAX_NUM_CELLS_TO_DRAW;
let tile_depth = camera.get_tile_depth();
while d > 5 {
self.mocs[d].cell_indices_in_view(camera);
num_cells = self.mocs[d].num_cells_in_view(camera);
let num_cells = self.mocs[d].num_cells_in_view(camera);
if num_cells < MAX_NUM_CELLS_TO_DRAW {
break;
}

View File

@@ -1,37 +1,24 @@
use al_api::moc::MOC as Cfg;
use std::cmp::Ordering;
use std::collections::HashSet;
use std::ops::Range;
use std::vec;
use crate::camera;
use crate::camera::CameraViewPort;
use crate::healpix::cell::CellVertices;
use crate::healpix::coverage::HEALPixCoverage;
use crate::math::projection::ProjectionType;
use crate::renderable::coverage::mode::RenderMode;
use crate::renderable::coverage::Angle;
use crate::renderable::coverage::HEALPixCell;
use crate::renderable::coverage::IdxVec;
use crate::renderable::line::PathVertices;
use crate::renderable::line::RasterizedLineRenderer;
use al_api::color::ColorRGBA;
use al_api::coo_system::CooSystem;
use al_api::Abort;
use healpix::{
compass_point::{Cardinal, MainWind, Ordinal, OrdinalMap, OrdinalSet},
nested::moc::HpxCell,
};
use moclib::elem::cell::Cell;
use moclib::moc::RangeMOCIntoIterator;
use moclib::moc::RangeMOCIterator;
use moclib::qty::Hpx;
use super::mode::Node;
use moclib::moc::range::CellAndNeighs;
use al_core::{info, inforec, log};
use cgmath::Vector2;
pub struct MOC([Option<MOCIntern>; 3]);
@@ -53,7 +40,7 @@ impl MOC {
},
if cfg.filled {
// change color
let mut fill_color = cfg.fill_color;
let fill_color = cfg.fill_color;
// draw the edges
Some(MOCIntern::new(
moc,
@@ -94,7 +81,7 @@ impl MOC {
.sum()
}
pub(super) fn num_vertices_in_view(&self, camera: &mut CameraViewPort) -> usize {
/*pub(super) fn num_vertices_in_view(&self, camera: &mut CameraViewPort) -> usize {
let mut num_vertices = 0;
for render in &self.0 {
if let Some(render) = render.as_ref() {
@@ -103,7 +90,7 @@ impl MOC {
}
num_vertices
}
}*/
pub(super) fn draw(
&self,
@@ -226,7 +213,7 @@ impl MOCIntern {
self.indices = indices;
}
fn num_vertices_in_view(&self, camera: &CameraViewPort) -> usize {
/*fn num_vertices_in_view(&self, camera: &CameraViewPort) -> usize {
self.cells_in_view(camera)
.filter_map(|n| n.vertices.as_ref())
.map(|n_vertices| {
@@ -237,16 +224,16 @@ impl MOCIntern {
.sum::<usize>()
})
.sum()
}
}*/
fn num_cells_in_view(&self, camera: &CameraViewPort) -> usize {
fn num_cells_in_view(&self, _camera: &CameraViewPort) -> usize {
self.indices
.iter()
.map(|range| range.end - range.start)
.sum()
}
fn cells_in_view<'a>(&'a self, camera: &CameraViewPort) -> impl Iterator<Item = &'a Node> {
fn cells_in_view<'a>(&'a self, _camera: &CameraViewPort) -> impl Iterator<Item = &'a Node> {
let nodes = &self.nodes;
self.indices
.iter()
@@ -257,7 +244,7 @@ impl MOCIntern {
fn vertices_in_view<'a>(
&'a self,
camera: &mut CameraViewPort,
projection: &ProjectionType,
_projection: &ProjectionType,
) -> impl Iterator<Item = &'a CellVertices> {
self.cells_in_view(camera)
.filter_map(move |node| node.vertices.as_ref())

View File

@@ -1,51 +1,27 @@
use crate::{
healpix::{
cell::{HEALPixCell, ALLSKY_HPX_CELLS_D0},
coverage::HEALPixCoverage,
index_vector::IdxVec,
},
healpix::{cell::HEALPixCell, coverage::HEALPixCoverage, index_vector::IdxVec},
math::angle::Angle,
CameraViewPort, ShaderManager,
};
use moc::RenderModeType;
mod graph;
pub mod mode;
use al_core::{VecData, VertexArrayObject, WebGlContext};
use std::collections::HashSet;
pub mod hierarchy;
pub mod moc;
use crate::math::TWICE_PI;
use al_core::{info, inforec, log};
use crate::math::angle::ToAngle;
use crate::math::lonlat::LonLatT;
use crate::renderable::line::RasterizedLineRenderer;
use al_core::shader::Shader;
use moclib::elem::cell::Cell;
use moclib::elemset::range::MocRanges;
use moclib::moc::range::RangeMOC;
use moclib::moc::{RangeMOCIntoIterator, RangeMOCIterator};
use moclib::ranges::Ranges;
use std::{collections::HashMap, fmt::format};
use wasm_bindgen::JsValue;
use web_sys::WebGl2RenderingContext;
use hierarchy::MOCHierarchy;
use super::{line::PathVertices, utils::Triangle};
use cgmath::InnerSpace;
use super::utils::Triangle;
use al_api::coo_system::CooSystem;
use std::ops::Range;
use al_api::moc::MOC as Cfg;
type MOCIdx = String;
use crate::Abort;
pub struct MOCRenderer {
mocs: Vec<MOCHierarchy>,
cfgs: Vec<Cfg>,
@@ -324,7 +300,7 @@ impl MOCRenderer {
pub fn draw(
&mut self,
shaders: &mut ShaderManager,
_shaders: &mut ShaderManager,
camera: &mut CameraViewPort,
projection: &ProjectionType,
line_renderer: &mut RasterizedLineRenderer,

View File

@@ -3,20 +3,19 @@ use super::Node;
use super::RenderMode;
use crate::HEALPixCoverage;
use al_api::Abort;
use healpix::{
compass_point::{Cardinal, MainWind, Ordinal, OrdinalMap, OrdinalSet},
nested::moc::HpxCell,
compass_point::{Ordinal, OrdinalMap},
};
use moclib::elem::cell::Cell;
use moclib::moc::range::CellAndNeighs;
use moclib::moc::RangeMOCIntoIterator;
use moclib::moc::RangeMOCIterator;
use moclib::qty::Hpx;
use al_core::{info, inforec, log};
use crate::healpix::cell::HEALPixCell;
pub struct Edge;
@@ -32,7 +31,7 @@ impl RenderMode for Edge {
if let Some(edge_neigs) = &n.edge_neigs[Ordinal::NW as u8 as usize] {
// if the smallest neig for this edge is smaller than self
let smallest_neig_depth = edge_neigs.max_depth_neig;
let _smallest_neig_depth = edge_neigs.max_depth_neig;
let first_neig_idx = edge_neigs.neig_idx[0];
let neig_cell = &g.nodes()[first_neig_idx].cell;
@@ -62,7 +61,7 @@ impl RenderMode for Edge {
if let Some(edge_neigs) = &n.edge_neigs[Ordinal::SW as u8 as usize] {
// if the smallest neig for this edge is smaller than self
let smallest_neig_depth = edge_neigs.max_depth_neig;
let _smallest_neig_depth = edge_neigs.max_depth_neig;
let first_neig_idx = edge_neigs.neig_idx[0];
let neig_cell = &g.nodes()[first_neig_idx].cell;
@@ -92,7 +91,7 @@ impl RenderMode for Edge {
if let Some(edge_neigs) = &n.edge_neigs[Ordinal::SE as u8 as usize] {
// if the smallest neig for this edge is smaller than self
let smallest_neig_depth = edge_neigs.max_depth_neig;
let _smallest_neig_depth = edge_neigs.max_depth_neig;
let first_neig_idx = edge_neigs.neig_idx[0];
let neig_cell = &g.nodes()[first_neig_idx].cell;
@@ -121,7 +120,7 @@ impl RenderMode for Edge {
if let Some(edge_neigs) = &n.edge_neigs[Ordinal::NE as u8 as usize] {
// if the smallest neig for this edge is smaller than self
let smallest_neig_depth = edge_neigs.max_depth_neig;
let _smallest_neig_depth = edge_neigs.max_depth_neig;
let first_neig_idx = edge_neigs.neig_idx[0];
let neig_cell = &g.nodes()[first_neig_idx].cell;

View File

@@ -3,19 +3,7 @@ use super::Node;
use super::RenderMode;
use crate::HEALPixCoverage;
use healpix::{
compass_point::{Cardinal, MainWind, Ordinal, OrdinalMap, OrdinalSet},
nested::moc::HpxCell,
};
use moclib::elem::cell::Cell;
use moclib::moc::range::CellAndNeighs;
use moclib::moc::RangeMOCIntoIterator;
use moclib::moc::RangeMOCIterator;
use moclib::qty::Hpx;
use al_core::{info, inforec, log};
use crate::healpix::cell::HEALPixCell;
use healpix::compass_point::{Ordinal, OrdinalMap};
use super::super::graph::G;
pub struct Fill;

View File

@@ -3,13 +3,12 @@ use super::RenderMode;
use crate::healpix::cell::HEALPixCell;
use healpix::{
compass_point::{Cardinal, MainWind, Ordinal, OrdinalMap, OrdinalSet},
nested::moc::HpxCell,
compass_point::{Ordinal, OrdinalMap},
};
use moclib::elem::cell::Cell;
use moclib::moc::RangeMOCIntoIterator;
use moclib::moc::RangeMOCIterator;
use moclib::qty::Hpx;
use crate::HEALPixCoverage;
use moclib::moc::range::CellAndEdges;

View File

@@ -33,7 +33,7 @@ use crate::time::Time;
use crate::survey::buffer::ImageSurveyTextures;
use crate::survey::texture::Texture;
use al_api::coo_system::CooSystem;
use raytracing::RayTracer;
use uv::{TileCorner, TileUVW};
@@ -508,8 +508,8 @@ impl HiPS {
let textures = ImageSurveyTextures::new(gl, config)?;
let gl = gl.clone();
let depth = 0;
let depth_tile = 0;
let _depth = 0;
let _depth_tile = 0;
let footprint_moc = None;
// request the allsky texture

View File

@@ -17,7 +17,7 @@ use lyon::algorithms::{
path::Path,
};
use al_core::{info, inforec, log};
use al_core::{inforec, log};
struct Meta {
color: ColorRGBA,

View File

@@ -1,5 +1,5 @@
use crate::{healpix::cell::HEALPixCell, time::Time};
use al_core::{info, inforec, log};
use std::collections::HashSet;
pub struct Texture {

View File

@@ -1,12 +1,12 @@
use crate::downloader::query::Query;
use crate::downloader::request::tile::Tile;
use crate::downloader::{query, Downloader};
use crate::renderable::HiPS;
use crate::Abort;
use al_core::{info, inforec, log};
use std::collections::{HashSet, VecDeque};
use std::collections::{VecDeque};
const MAX_NUM_TILE_FETCHING: isize = 8;
const MAX_QUERY_QUEUE_LENGTH: usize = 100;
@@ -32,7 +32,7 @@ impl TileFetcherQueue {
//self.query_set.clear();
}
pub fn append(&mut self, query: query::Tile, downloader: &mut Downloader) {
pub fn append(&mut self, query: query::Tile, _downloader: &mut Downloader) {
// Check if the query has already been done
//if !self.query_set.contains(&query) {
// discard too old tile queries
@@ -44,7 +44,7 @@ impl TileFetcherQueue {
}
// fetch the base tile
pub fn append_base_tile(&mut self, query: query::Tile, downloader: &mut Downloader) {
pub fn append_base_tile(&mut self, query: query::Tile, _downloader: &mut Downloader) {
self.base_tile_queries.push(query);
}

View File

@@ -38,6 +38,8 @@ pub fn unmortonize(mut x: u64) -> (u32, u32) {
(x as u32, y as u32)
}
// Transmute utils functions
#[allow(dead_code)]
pub unsafe fn transmute_boxed_slice<I, O>(s: Box<[I]>) -> Box<[O]> {
let len = s.len();
let in_slice_ptr = Box::into_raw(s);

View File

@@ -185,7 +185,7 @@ import $ from 'jquery';
}
url = Utils.fixURLForHTTPS(url);
const moc = A.MOCFromURL(url, {lineWidth: 5, opacity: 0.3, fillColor: 'magenta', fill: true});
const moc = A.MOCFromURL(url, {lineWidth: 5, opacity: 0.3});
self.aladin.addMOC(moc);
});