Class TopoGraphNode
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.sorting.TopoGraphNode
-
public class TopoGraphNode extends java.lang.Objecta graph node which references to a cell.
-
-
Field Summary
Fields Modifier and Type Field Description static intcurrentMarkedFlagbit position = camera id
-
Constructor Summary
Constructors Constructor Description TopoGraphNode(RenderCell cell)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCoveredEnts(AbstractEntity ent)adds the entity into a cell for depth sortingvoidclearCoveredEnts()static voidflagRebuildCoverList()Only relevant to topological depth sortTopologicalSort.RenderCellgetCell()get the represented cell instancejava.util.LinkedList<TopoGraphNode>getCoveredBlocks(RenderStorage rs)java.util.LinkedList<AbstractEntity>getCoveredEnts()static voidinverseMarkedFlag(int id)inverses the dirty flag comparison so everything marked is now unmarked.booleanisMarkedDS(int cameraId)Check if it is marked in this frame.voidmarkAsVisitedDS(int id)Marks as visited in the depth sorting algorithm.voidsetCell(RenderCell cell)
-
-
-
Constructor Detail
-
TopoGraphNode
public TopoGraphNode(RenderCell cell)
-
-
Method Detail
-
flagRebuildCoverList
public static void flagRebuildCoverList()
Only relevant to topological depth sortTopologicalSort. Sets a flag which causes the baking of the coverlist. This causes every field wich contains the covered neighbors to be rebuild. Used to prenvent duplicate graph rebuilds in one frame.
-
inverseMarkedFlag
public static void inverseMarkedFlag(int id)
inverses the dirty flag comparison so everything marked is now unmarked. used to mark the visited obejcts with depthsort.- Parameters:
id-
-
addCoveredEnts
public void addCoveredEnts(AbstractEntity ent)
adds the entity into a cell for depth sorting- Parameters:
ent-
-
getCoveredEnts
public java.util.LinkedList<AbstractEntity> getCoveredEnts()
-
clearCoveredEnts
public void clearCoveredEnts()
-
getCoveredBlocks
public java.util.LinkedList<TopoGraphNode> getCoveredBlocks(RenderStorage rs)
-
isMarkedDS
public final boolean isMarkedDS(int cameraId)
Check if it is marked in this frame. Used for depth sorting.- Parameters:
cameraId- camera cameraId- Returns:
- See Also:
TopologicalSort.visit(TopoGraphNode)
-
markAsVisitedDS
public void markAsVisitedDS(int id)
Marks as visited in the depth sorting algorithm.- Parameters:
id- camera id- See Also:
TopologicalSort.visit(TopoGraphNode)
-
getCell
public RenderCell getCell()
get the represented cell instance- Returns:
-
setCell
public void setCell(RenderCell cell)
- Parameters:
cell-
-
-