Turn shapeObject's vertices into a stream
This commit is contained in:
@@ -12,5 +12,5 @@ data ForegroundShape = ForegroundShape
|
||||
, _fsRad :: Float -- This should probably be a bounding box
|
||||
, _fsSPic :: SPic
|
||||
}
|
||||
deriving (Eq,Show,Ord)
|
||||
deriving ()
|
||||
makeLenses ''ForegroundShape
|
||||
|
||||
+8
-8
@@ -45,14 +45,14 @@ initialAnoTree = OnwardList
|
||||
, AnRoom slowDoorRoom
|
||||
-- , AnRoom $ roomCCrits 10
|
||||
, AnTree firstBreather
|
||||
-- , AnTree $ telRoomLev 1 >>= rToOnward "telRoomLev" . pure . cleatOnward
|
||||
-- ]
|
||||
--
|
||||
--extraAnoList :: [Annotation]
|
||||
--extraAnoList =
|
||||
---- , (SpecificRoom . return . tToBTree $ treePost [corridor,corridor,cleatOnward corridor])
|
||||
-- [ AnRoom $ roomCCrits 10
|
||||
-- , AnRoom $ roomCCrits 10
|
||||
, AnTree $ telRoomLev 1 >>= rToOnward "telRoomLev" . pure . cleatOnward
|
||||
]
|
||||
|
||||
extraAnoList :: [Annotation]
|
||||
extraAnoList =
|
||||
-- , (SpecificRoom . return . tToBTree $ treePost [corridor,corridor,cleatOnward corridor])
|
||||
[ AnRoom $ roomCCrits 10
|
||||
, AnRoom $ roomCCrits 10
|
||||
, AnTree $ tToBTree "spawners" <$> spawnerRoom
|
||||
, AnRoom pistolerRoom
|
||||
, AnRoom doubleCorridorBarrels
|
||||
|
||||
@@ -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