Turn shapeObject's vertices into a stream
This commit is contained in:
@@ -125,14 +125,14 @@ putShape sh = PutForeground $ defaultForeground
|
||||
& fsRad .~ radBounds bnds
|
||||
& fsSPic .~ noPic (uncurryV translateSHf (-m) $ sh)
|
||||
where
|
||||
bnds = shapeBounds sh
|
||||
bnds = (0,0,0,0) -- shapeBounds sh
|
||||
m = midBounds bnds
|
||||
|
||||
shapePoints :: Shape -> Stream (Of Point2) Identity ()
|
||||
shapePoints = S.each . concatMap (map (stripZ . _svPos) . _shVs)
|
||||
--shapePoints :: Shape -> Stream (Of Point2) Identity ()
|
||||
--shapePoints = S.each . concatMap (map (stripZ . _svPos) . _shVs)
|
||||
|
||||
shapeBounds :: Shape -> (Float,Float,Float,Float)
|
||||
shapeBounds = fromMaybe (0,0,0,0) . boundPoints . shapePoints
|
||||
--shapeBounds :: Shape -> (Float,Float,Float,Float)
|
||||
--shapeBounds = fromMaybe (0,0,0,0) . boundPoints . shapePoints
|
||||
|
||||
midBounds :: (Float,Float,Float,Float) -> Point2
|
||||
midBounds (n,s,e,w) = V2 ((n + s)/2) ((e + w)/2)
|
||||
|
||||
Reference in New Issue
Block a user