rtiow: add blox with gloxy edges.
Fixed bug in kdtree that this uncovered. Marked Hit and it's dependencies as needing to implement the Debug trait.
This commit is contained in:
@@ -5,6 +5,7 @@ use rand;
|
||||
use crate::{noise::NoiseSource, vec3::Vec3};
|
||||
|
||||
const NOISE_SIZE: usize = 128;
|
||||
#[derive(Debug)]
|
||||
pub struct Lode {
|
||||
// Using fixed array causes stack overflow.
|
||||
noise: Vec<Vec<Vec<f32>>>, //[[[f32; NOISE_SIZE]; NOISE_SIZE]; NOISE_SIZE],
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
pub mod lode;
|
||||
pub mod perlin;
|
||||
|
||||
use std::f32::consts::PI;
|
||||
use std::{f32::consts::PI, fmt::Debug};
|
||||
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
use crate::vec3::Vec3;
|
||||
|
||||
pub trait NoiseSource: Send + Sync {
|
||||
pub trait NoiseSource: Send + Sync + Debug {
|
||||
/// value returns noise on the interval [0., 1.).
|
||||
fn value(&self, p: Vec3) -> f32;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::{
|
||||
vec3::{dot, Vec3},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Perlin {
|
||||
ran_vec: Vec<Vec3>,
|
||||
perm_x: Vec<usize>,
|
||||
|
||||
Reference in New Issue
Block a user