org.osm2world.core.target.statistics
Class StatisticsTarget
Object
AbstractTarget<R>
PrimitiveTarget<RenderableToPrimitiveTarget>
StatisticsTarget
- All Implemented Interfaces:
- Target<RenderableToPrimitiveTarget>
public class StatisticsTarget
- extends PrimitiveTarget<RenderableToPrimitiveTarget>
a target that simply counts the primitives that are sent to it
to create statistics.
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatisticsTarget
public StatisticsTarget()
getRenderableType
public Class<RenderableToPrimitiveTarget> getRenderableType()
- Description copied from interface:
Target
- returns the renderable type designed for this target
render
public void render(RenderableToPrimitiveTarget renderable)
- Description copied from interface:
Target
- renders a renderable object to this target.
Usually, this means calling a "renderTo" method on that renderable,
with this target as a parameter.
beginObject
public void beginObject(WorldObject object)
- Description copied from interface:
Target
- announces the begin of the draw* calls for a
WorldObject
.
This allows targets to group them, if desired.
Otherwise, this can be ignored.
- Specified by:
beginObject
in interface Target<RenderableToPrimitiveTarget>
- Overrides:
beginObject
in class AbstractTarget<RenderableToPrimitiveTarget>
drawPrimitive
protected void drawPrimitive(Primitive.Type type,
Material material,
List<VectorXYZ> vs,
List<VectorXYZ> normals,
List<List<VectorXZ>> texCoordLists)
- Specified by:
drawPrimitive
in class PrimitiveTarget<RenderableToPrimitiveTarget>
vs
- vertices that form the primitivenormals
- normal vector for each vertex; same size as vstexCoordLists
- texture coordinates for each texture layer,
each list has the same size as vs
clear
public void clear()
getGlobalCount
public long getGlobalCount(StatisticsTarget.Stat stat)
getKnownMaterials
public Set<Material> getKnownMaterials()
getCountForMaterial
public long getCountForMaterial(Material material,
StatisticsTarget.Stat stat)
getKnownRenderableClasses
public Set<Class<?>> getKnownRenderableClasses()
getCountForClass
public long getCountForClass(Class<?> c,
StatisticsTarget.Stat stat)