spirv: migrate Material trait to types, and parameterize by R
This commit is contained in:
@@ -19,8 +19,9 @@ pub mod support;
|
||||
pub use sim::{SerializedSimMeta, SerializedStepE, SerializedStepH};
|
||||
pub use support::{Optional, UnsizedArray};
|
||||
|
||||
use mat::{IsoConductorOr, Ferroxcube3R1MH, FullyGenericMaterial, Material};
|
||||
use mat::{IsoConductorOr, Ferroxcube3R1MH, FullyGenericMaterial};
|
||||
|
||||
use coremem_types::mat::Material;
|
||||
use coremem_types::vec::{Vec3, Vec3u};
|
||||
|
||||
type Iso3R1 = IsoConductorOr<Ferroxcube3R1MH>;
|
||||
@@ -29,7 +30,7 @@ fn glam_vec_to_internal(v: glam::UVec3) -> Vec3u {
|
||||
Vec3u::new(v.x, v.y, v.z)
|
||||
}
|
||||
|
||||
fn step_h<M: Material>(
|
||||
fn step_h<M: Material<f32>>(
|
||||
id: Vec3u,
|
||||
meta: &SerializedSimMeta,
|
||||
stimulus_h: &UnsizedArray<Vec3<f32>>,
|
||||
@@ -45,7 +46,7 @@ fn step_h<M: Material>(
|
||||
}
|
||||
}
|
||||
|
||||
fn step_e<M: Material>(
|
||||
fn step_e<M: Material<f32>>(
|
||||
id: Vec3u,
|
||||
meta: &SerializedSimMeta,
|
||||
stimulus_e: &UnsizedArray<Vec3<f32>>,
|
||||
|
Reference in New Issue
Block a user