use super::{Child, Init};

#[cfg(feature = "use_2d")]
use super::transform_2d::{InnerTransform2D, LocalTransform2D, Transform2D};

#[cfg(feature = "use_3d")]
use super::transform_3d::{InnerTransform3D, LocalTransform3D, Transform3D};

use number_traits::Float;
use specs::World;


#[inline]
pub fn register<T: 'static + Sync + Send + Copy + Float>(world: &mut World) {

    world.register::<Child>();
    world.register::<Init>();

    if cfg!(feature = "use_3d") {
        world.register::<InnerTransform3D<T>>();
        world.register::<LocalTransform3D<T>>();
        world.register::<Transform3D<T>>();
    }
    if cfg!(feature = "use_2d") {
        world.register::<InnerTransform2D<T>>();
        world.register::<LocalTransform2D<T>>();
        world.register::<Transform2D<T>>();
    }
}
