de.grogra.imp3d
Class LineSegmentizationCache
java.lang.Object
de.grogra.graph.Cache
de.grogra.imp3d.LineSegmentizationCache
public class LineSegmentizationCache
- extends Cache
This class can be used to cache the result of segmentization
of LineSegmentizable
shapes.
- Author:
- Ole Kniemeyer
Nested classes/interfaces inherited from class de.grogra.graph.Cache |
Cache.Entry |
Fields inherited from class de.grogra.graph.Cache |
gs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LineSegmentizationCache
public LineSegmentizationCache(GraphState gs,
float flatness)
- Constructs a new cache. The parameters will be passed
to
LineSegmentizable.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 to segmentize
createEntry
protected Cache.Entry createEntry(java.lang.Object obj,
boolean node,
ContextDependent dep,
java.lang.Object strategy)
- Specified by:
createEntry
in class Cache
get
public LineArray get(java.lang.Object object,
boolean asNode,
LineSegmentizable ls)
- Returns the
LineArray
of a LineSegmentizable
in the given object context.
- Parameters:
object
- the contextasNode
- true
if object
is a node,
false
if object
is an edgels
- the segmentizable
- Returns:
- a
LineArray
, computed by ls