Tweak weapon pictures
This commit is contained in:
@@ -11,6 +11,7 @@ module Shape
|
||||
, translateSHf
|
||||
, rotateSH
|
||||
, rotateSHx
|
||||
, polyCircx
|
||||
, scaleSH
|
||||
, colorSH
|
||||
)
|
||||
@@ -24,10 +25,15 @@ emptySH :: Shape
|
||||
{-# INLINE emptySH #-}
|
||||
emptySH = mempty
|
||||
|
||||
-- - approximate a circle by a polygon with n*2 points of radius x
|
||||
polyCirc :: Int -> Float -> [Point2]
|
||||
{-# INLINE polyCirc #-}
|
||||
polyCirc n x = map (\a -> rotateV a (V2 x 0)) $ take (n*2) [0,pi/fromIntegral n..]
|
||||
|
||||
-- - approximate a circle around the x axis by a polygon with n*2 points of radius r
|
||||
polyCircx :: Int -> Float -> [Point3]
|
||||
polyCircx n = map (vNormaly . addZ 0) . polyCirc n
|
||||
|
||||
-- very "unsafe": be careful with the inputs
|
||||
-- length of polys must be the same
|
||||
-- points should be correctly ordered so that
|
||||
|
||||
Reference in New Issue
Block a user