packages feed

geomancy-0.4.1.0 / src / Geomancy / Transform / Tree.hs

module Geomancy.Transform.Tree  ( Transformed  , apply  , node_  , leaf_  , collect_  , translate_  , translateV_  , rotateX_  , rotateY_  , rotateZ_  , rotateQ_  , scale_  , scaleX_  , scaleY_  , scaleZ_  , scaleXY_  , scale3_  ) whereimport Geomancy.Quaternion (Quaternion)import Geomancy.Transform (Transform)import Geomancy.Tree (Tree, apply, node_, leaf_, collect_)import Geomancy.Vec3 (Vec3)import qualified Geomancy.Transform as Transformtype Transformed a = Tree (Transform, Maybe a){-# INLINE translate_ #-}translate_  :: Float  -> Float  -> Float  -> [Transformed a]  -> Transformed atranslate_ x y z =  node_ (Transform.translate x y z){-# INLINE translateV_ #-}translateV_  :: Vec3  -> [Transformed a]  -> Transformed atranslateV_ xyz =  node_ (Transform.translateV xyz){-# INLINE rotateX_ #-}rotateX_  :: Float  -> [Transformed a]  -> Transformed arotateX_ rads =  node_ (Transform.rotateX rads){-# INLINE rotateY_ #-}rotateY_  :: Float  -> [Transformed a]  -> Transformed arotateY_ rads =  node_ (Transform.rotateY rads){-# INLINE rotateZ_ #-}rotateZ_  :: Float  -> [Transformed a]  -> Transformed arotateZ_ rads =  node_ (Transform.rotateZ rads){-# INLINE rotateQ_ #-}rotateQ_  :: Quaternion  -> [Transformed a]  -> Transformed arotateQ_ rot =  node_ (Transform.rotateQ rot){-# INLINE scale_ #-}scale_  :: Float  -> [Transformed a]  -> Transformed ascale_ x =  node_ (Transform.scale x){-# INLINE scaleX_ #-}scaleX_  :: Float  -> [Transformed a]  -> Transformed ascaleX_ rads =  node_ (Transform.scaleX rads){-# INLINE scaleY_ #-}scaleY_  :: Float  -> [Transformed a]  -> Transformed ascaleY_ rads =  node_ (Transform.scaleY rads){-# INLINE scaleZ_ #-}scaleZ_  :: Float  -> [Transformed a]  -> Transformed ascaleZ_ rads =  node_ (Transform.scaleZ rads){-# INLINE scaleXY_ #-}scaleXY_  :: Float  -> Float  -> [Transformed a]  -> Transformed ascaleXY_ x y =  node_ (Transform.scaleXY x y){-# INLINE scale3_ #-}scale3_  :: Float  -> Float  -> Float  -> [Transformed a]  -> Transformed ascale3_ x y z =  node_ (Transform.scale3 x y z)