19 lines
407 B
Rust
19 lines
407 B
Rust
|
use crate::Component;
|
||
|
|
||
|
use glam::{Vec3, Quat, Vec2, Vec4, Mat4};
|
||
|
|
||
|
macro_rules! impl_component_math {
|
||
|
($type: ident) => {
|
||
|
impl Component for $type {
|
||
|
fn name() -> &'static str {
|
||
|
stringify!($type)
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
impl_component_math!(Vec2);
|
||
|
impl_component_math!(Vec3);
|
||
|
impl_component_math!(Vec4);
|
||
|
impl_component_math!(Mat4);
|
||
|
impl_component_math!(Quat);
|