Move the metric stuff out of the binary
This commit is contained in:
parent
b0aa666af3
commit
caa93e5ffd
|
|
@ -4,20 +4,13 @@ use flo_canvas::*;
|
|||
use flo_draw::*;
|
||||
use glam::*;
|
||||
|
||||
use crate::ifaces::{DebugTraceable, Traceable};
|
||||
use refraction::ifaces::{DebugTraceable, Traceable};
|
||||
use refraction::mathx::MatExt;
|
||||
use riemann::{trace_iter, Metric};
|
||||
use tube::metric::Tube;
|
||||
use tube::Space;
|
||||
use types::{Location, Object, Ray};
|
||||
|
||||
mod fns;
|
||||
mod ifaces;
|
||||
mod riemann;
|
||||
mod tube;
|
||||
mod types;
|
||||
|
||||
const DT: f32 = 0.1;
|
||||
use refraction::riemann::{trace_iter, Metric};
|
||||
use refraction::tube::metric::Tube;
|
||||
use refraction::tube::Space;
|
||||
use refraction::types::{Location, Object, Ray};
|
||||
use refraction::DT;
|
||||
|
||||
fn draw_loop(gc: &mut Vec<Draw>, mut pts: impl Iterator<Item = Vec2>) {
|
||||
gc.new_path();
|
||||
|
|
@ -163,7 +156,7 @@ fn test_put_object() {
|
|||
use approx::assert_abs_diff_eq;
|
||||
|
||||
let ε = 1e-5;
|
||||
let m = riemann::samples::ScaledMetric {
|
||||
let m = refraction::riemann::samples::ScaledMetric {
|
||||
scale: vec2(3., 4.),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use refraction::mathx::FloatExt2;
|
||||
use crate::mathx::FloatExt2;
|
||||
|
||||
pub trait Limiter {
|
||||
fn value(&self, x: f32) -> f32;
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
mod fns;
|
||||
pub mod ifaces;
|
||||
pub mod mathx;
|
||||
pub mod mesh_loader;
|
||||
pub mod mesh_tracer;
|
||||
pub mod riemann;
|
||||
pub mod tube;
|
||||
pub mod types;
|
||||
|
||||
pub const DT: f32 = 0.1;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::mathx::Decomp2;
|
||||
use glam::*;
|
||||
use refraction::mathx::Decomp2;
|
||||
|
||||
pub type Tens2 = [Mat2; 2];
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
use glam::{f32, vec2, Mat2, Vec2};
|
||||
use refraction::mathx::Decomp2;
|
||||
|
||||
use crate::fns::{self, Limiter};
|
||||
use crate::mathx::Decomp2;
|
||||
use crate::riemann::{Metric, Tens2};
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
|
@ -75,10 +75,10 @@ mod test {
|
|||
use glam::{vec2, Vec2};
|
||||
use itertools_num::linspace;
|
||||
|
||||
use crate::mathx::Decomp2;
|
||||
use crate::riemann::Metric;
|
||||
use crate::tube::Space;
|
||||
use crate::types::Ray;
|
||||
use refraction::mathx::Decomp2;
|
||||
|
||||
use super::Tube;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user