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 floatWINDAMPLITUDE-
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 voidbakeIteratorCache()rebuilds the reference list for fields which will be called for the depthsorting.voidcreateDepthList(java.util.LinkedList<AbstractGameObject> depthlist)Sorts the list of game objects.voiddrawGrass(int n, Point pos)voidrenderSorted()Renders in sorted orderstatic voidupdateWind(float dt)voidvisit(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:AbstractSorterRenders in sorted order- Specified by:
renderSortedin 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:AbstractSorterSorts the list of game objects.- Specified by:
createDepthListin classAbstractSorter
-
bakeIteratorCache
public void bakeIteratorCache()
Description copied from class:AbstractSorterrebuilds the reference list for fields which will be called for the depthsorting.- Overrides:
bakeIteratorCachein classAbstractSorter
-
-