Add intersection with cylinders
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
module Geometry.Vector where
|
||||
|
||||
import Linear
|
||||
import Geometry.Data
|
||||
|
||||
-- | Moves from two to three dimensions, adding zero in z direction.
|
||||
@@ -218,3 +219,7 @@ xyzV4 (V4 x y z _) = V3 x y z
|
||||
xyV3 :: V3 a -> V2 a
|
||||
{-# INLINE xyV3 #-}
|
||||
xyV3 (V3 x y _) = V2 x y
|
||||
|
||||
reflectInNormal :: (Metric v,Fractional a,Num (v a)) => v a -> v a -> v a
|
||||
{-# INLINE reflectInNormal #-}
|
||||
reflectInNormal n v = v - (2 * project n v)
|
||||
|
||||
Reference in New Issue
Block a user