Commit before attempt to remove geometry shaders from shadow extrusion
This commit is contained in:
+5
-5
@@ -30,14 +30,14 @@ import Data.Bifunctor
|
||||
|
||||
getNodePos :: Int -> World -> Maybe Point2
|
||||
--getNodePos i w = _pathGraph (_cWorld w) `lab` i
|
||||
getNodePos i w = (w ^. cWorld . lWorld . pathGraph) `lab` i
|
||||
getNodePos i w = (w ^. cWorld . pathGraph) `lab` i
|
||||
|
||||
makePathBetween :: Point2 -> Point2 -> World -> Maybe [Int]
|
||||
makePathBetween a b w = do
|
||||
-- join $ sp <$> a' <*> b' <*> return (_pathGraph w)
|
||||
na <- walkableNodeNear w a
|
||||
nb <- walkableNodeNear w b
|
||||
sp na nb (second _peDist (efilter (not . pathEdgeObstructed . (^. _3)) $ w ^. cWorld . lWorld . pathGraph))
|
||||
sp na nb (second _peDist (efilter (not . pathEdgeObstructed . (^. _3)) $ w ^. cWorld . pathGraph))
|
||||
--_pathGraph (_cWorld w)))
|
||||
|
||||
pathEdgeObstructed :: PathEdge -> Bool
|
||||
@@ -53,13 +53,13 @@ walkableNodeNear w p = fmap fst . find (flip (isWalkable p) w . snd) $ nodesNear
|
||||
|
||||
makePathBetweenPs :: Point2 -> Point2 -> World -> Maybe [Point2]
|
||||
--makePathBetweenPs a b w = mapMaybe (lab $ _pathGraph (_cWorld w)) <$> makePathBetween a b w
|
||||
makePathBetweenPs a b w = mapMaybe (lab $ w ^. cWorld . lWorld . pathGraph) <$> makePathBetween a b w
|
||||
makePathBetweenPs a b w = mapMaybe (lab $ w ^. cWorld . pathGraph) <$> makePathBetween a b w
|
||||
|
||||
bfsNodePoints :: Int -> World -> [Point2]
|
||||
bfsNodePoints n w = mapMaybe (lab g) $ bfs n g
|
||||
where
|
||||
--g = _pathGraph (_cWorld w)
|
||||
g = w ^. cWorld . lWorld . pathGraph
|
||||
g = w ^. cWorld . pathGraph
|
||||
|
||||
pointTowardsImpulse :: Point2 -> Point2 -> World -> Maybe Point2
|
||||
pointTowardsImpulse a b w = (find (flip (isWalkable a) w) . reverse) =<< makePathBetweenPs a b w
|
||||
@@ -138,7 +138,7 @@ addEdges nodemap gr = foldl' f (mempty, gr)
|
||||
|
||||
obstructPathsCrossing :: EdgeObstacle -> Point2 -> Point2 -> World -> (World, Set PathEdgeNodes)
|
||||
obstructPathsCrossing obstacletype sp' ep w =
|
||||
( w & cWorld . lWorld . pathGraph %~ updateedges
|
||||
( w & cWorld . pathGraph %~ updateedges
|
||||
, es
|
||||
)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user