spirv: remove mat.rs
and reuse coremem_types::mat everywhere
This commit is contained in:
@@ -12,19 +12,16 @@ pub use spirv_std::glam;
|
||||
#[cfg(not(target_arch = "spirv"))]
|
||||
use spirv_std::macros::spirv;
|
||||
|
||||
pub mod mat;
|
||||
pub mod sim;
|
||||
pub mod support;
|
||||
|
||||
pub use sim::{SerializedSimMeta, SerializedStepE, SerializedStepH};
|
||||
pub use support::{Optional, UnsizedArray};
|
||||
|
||||
use mat::{IsoConductorOr, FullyGenericMaterial};
|
||||
|
||||
use coremem_types::mat::{Ferroxcube3R1MH, Material};
|
||||
use coremem_types::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr, Material};
|
||||
use coremem_types::vec::{Vec3, Vec3u};
|
||||
|
||||
type Iso3R1 = IsoConductorOr<Ferroxcube3R1MH>;
|
||||
type Iso3R1<R> = IsoConductorOr<R, Ferroxcube3R1MH>;
|
||||
|
||||
fn glam_vec_to_internal(v: glam::UVec3) -> Vec3u {
|
||||
Vec3u::new(v.x, v.y, v.z)
|
||||
@@ -66,10 +63,10 @@ fn step_e<M: Material<f32>>(
|
||||
pub fn entry_points<M: 'static>() -> Optional<(&'static str, &'static str)> {
|
||||
use core::any::TypeId;
|
||||
let mappings = [
|
||||
(TypeId::of::<FullyGenericMaterial>(),
|
||||
(TypeId::of::<FullyGenericMaterial<f32>>(),
|
||||
("step_h_generic_material", "step_e_generic_material")
|
||||
),
|
||||
(TypeId::of::<Iso3R1>(),
|
||||
(TypeId::of::<Iso3R1<f32>>(),
|
||||
("step_h_iso_3r1", "step_e_iso_3r1")
|
||||
),
|
||||
];
|
||||
@@ -118,5 +115,5 @@ macro_rules! steps {
|
||||
};
|
||||
}
|
||||
|
||||
steps!(FullyGenericMaterial, step_h_generic_material, step_e_generic_material);
|
||||
steps!(Iso3R1, step_h_iso_3r1, step_e_iso_3r1);
|
||||
steps!(FullyGenericMaterial<f32>, step_h_generic_material, step_e_generic_material);
|
||||
steps!(Iso3R1<f32>, step_h_iso_3r1, step_e_iso_3r1);
|
||||
|
Reference in New Issue
Block a user