de.grogra.imp3d
public class PolygonizationCache extends Cache
Polygonizable shapes.Cache.Entry| Constructor and Description |
|---|
PolygonizationCache(GraphState gs,
int flags,
float flatness,
boolean shareLists)
Constructs a new cache.
|
| Modifier and Type | Method and Description |
|---|---|
protected Cache.Entry |
createEntry(java.lang.Object obj,
boolean node,
ContextDependent dep,
java.lang.Object strategy) |
PolygonArray |
get(java.lang.Object object,
boolean asNode,
Polygonizable p)
Returns the
PolygonArray of a Polygonizable
in the given object context. |
clear, clearUnused, getGraphState, getValuepublic PolygonizationCache(GraphState gs, int flags, float flatness, boolean shareLists)
Polygonization.polygonize(de.grogra.graph.ContextDependent, de.grogra.graph.GraphState, de.grogra.imp3d.PolygonArray, int, float)
when a cache entry is to be computed.gs - the graph state within which the cache will be usedflags - the flags to pass to polygonizeflatness - the flatness to pass to polygonizeshareLists - shall the returned PolygonArrays share their lists
(vertices, normals etc.)? This is useful where the
returned data is copied into another representation and no longer neededprotected Cache.Entry createEntry(java.lang.Object obj, boolean node, ContextDependent dep, java.lang.Object strategy)
createEntry in class Cachepublic PolygonArray get(java.lang.Object object, boolean asNode, Polygonizable p)
PolygonArray of a Polygonizable
in the given object context.object - the contextasNode - true if object is a node,
false if object is an edgep - the polygonizablePolygonArray, computed by p