de.grogra.imp3d.objects
Class PolygonsBase

java.lang.Object
  extended by de.grogra.imp3d.objects.PolygonsBase
All Implemented Interfaces:
ContextDependent, Polygons, Polygonization, java.io.Serializable
Direct Known Subclasses:
PolygonMesh

public abstract class PolygonsBase
extends java.lang.Object
implements Polygons, java.io.Serializable

This abstract class can be used as superclass for user-defined polygonal data. The method Polygonization.polygonize(de.grogra.graph.ContextDependent, de.grogra.graph.GraphState, de.grogra.imp3d.PolygonArray, int, float) has to be implemented.

Author:
Ole Kniemeyer
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface de.grogra.imp3d.Polygonization
COMPUTE_NORMALS, COMPUTE_UV
 
Constructor Summary
PolygonsBase()
           
 
Method Summary
 boolean dependsOnContext()
          Determines whether this object actually depends on context.
 int getStamp()
           
 void writeStamp(Cache.Entry cache, GraphState gs)
          Writes a stamp of the context into cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.imp3d.Polygonization
polygonize
 

Constructor Detail

PolygonsBase

public PolygonsBase()
Method Detail

dependsOnContext

public boolean dependsOnContext()
Description copied from interface: ContextDependent
Determines whether this object actually depends on context.

Specified by:
dependsOnContext in interface ContextDependent
Returns:
true iff this object depends on context

getStamp

public int getStamp()

writeStamp

public void writeStamp(Cache.Entry cache,
                       GraphState gs)
Description copied from interface: ContextDependent
Writes a stamp of the context into cache. Based on this stamp, a cache detects whether the context of this object has changed or not.

Specified by:
writeStamp in interface ContextDependent
Parameters:
cache - a cache entry to write the stamp
gs - the current graph state