{-# LANGUAGE RecordWildCards #-}
module KdT where
import Data.KdTree.Static (build, KdTree)
import Elem3D ( Foton(..), Point3D(..) )
{-# INLINE fotonAxis #-}
fotonAxis :: Foton -> [Float]
fotonAxis :: Foton -> [Float]
fotonAxis (Foton {pFot :: Foton -> Point3D
pFot = Point3D Float
x Float
y Float
z}) = [Float
x, Float
y, Float
z]
{-# INLINE createKD #-}
createKD :: [Foton] -> KdTree Float Foton
createKD :: [Foton] -> KdTree Float Foton
createKD = (Foton -> [Float]) -> [Foton] -> KdTree Float Foton
forall a p. Real a => PointAsListFn a p -> [p] -> KdTree a p
Data.KdTree.Static.build Foton -> [Float]
fotonAxis