Class TopologicalSort
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.sorting.AbstractSorter
-
- com.bombinggames.wurfelengine.core.sorting.TopologicalSort
-
public class TopologicalSort extends AbstractSorter
-
-
Field Summary
Fields Modifier and Type Field Description static float
WINDAMPLITUDE
-
Fields inherited from class com.bombinggames.wurfelengine.core.sorting.AbstractSorter
camera, gameView, iteratorCache
-
-
Constructor Summary
Constructors Constructor Description TopologicalSort(Camera camera)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bakeIteratorCache()
rebuilds the reference list for fields which will be called for the depthsorting.void
createDepthList(java.util.LinkedList<AbstractGameObject> depthlist)
Sorts the list of game objects.void
drawGrass(int n, Point pos)
void
renderSorted()
Renders in sorted orderstatic void
updateWind(float dt)
void
visit(TopoGraphNode node)
Topological sort for Cells-
Methods inherited from class com.bombinggames.wurfelengine.core.sorting.AbstractSorter
getTopLevel, handleMessage, updateCacheIfOutdated
-
-
-
-
Field Detail
-
WINDAMPLITUDE
public static final float WINDAMPLITUDE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TopologicalSort
public TopologicalSort(Camera camera)
-
-
Method Detail
-
updateWind
public static void updateWind(float dt)
-
renderSorted
public void renderSorted()
Description copied from class:AbstractSorter
Renders in sorted order- Specified by:
renderSorted
in classAbstractSorter
-
visit
public void visit(TopoGraphNode node)
Topological sort for Cells- Parameters:
node
-
-
drawGrass
public void drawGrass(int n, Point pos)
- Parameters:
n
-pos
-
-
createDepthList
public void createDepthList(java.util.LinkedList<AbstractGameObject> depthlist)
Description copied from class:AbstractSorter
Sorts the list of game objects.- Specified by:
createDepthList
in classAbstractSorter
-
bakeIteratorCache
public void bakeIteratorCache()
Description copied from class:AbstractSorter
rebuilds the reference list for fields which will be called for the depthsorting.- Overrides:
bakeIteratorCache
in classAbstractSorter
-
-