java.lang.Object
de.grogra.graph.Cache
de.grogra.imp3d.LineSegmentizationCache
This class can be used to cache the result of segmentization
of
LineSegmentizable shapes.- Author:
- Ole Kniemeyer
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.graph.Cache
Cache.Entry -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLineSegmentizationCache(GraphState gs, float flatness) Constructs a new cache. -
Method Summary
Modifier and TypeMethodDescriptionprotected Cache.EntrycreateEntry(Object obj, boolean node, ContextDependent dep, Object strategy) get(Object object, boolean asNode, LineSegmentizable ls) Returns theLineArrayof aLineSegmentizablein the given object context.Methods inherited from class de.grogra.graph.Cache
clear, clearUnused, getGraphState, getValue
-
Constructor Details
-
LineSegmentizationCache
Constructs a new cache. The parameters will be passed toLineSegmentizable.segmentize(ContextDependent, GraphState, LineArray, float)when a cache entry is to be computed.- Parameters:
gs- the graph state within which the cache will be usedflatness- the flatness to pass tosegmentize
-
-
Method Details
-
get
Returns theLineArrayof aLineSegmentizablein the given object context.- Parameters:
object- the contextasNode-trueifobjectis a node,falseifobjectis an edgels- the segmentizable- Returns:
- a
LineArray, computed byls
-
createEntry
- Specified by:
createEntryin classCache
-