Class AbstractInstancer<D extends InstanceData>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.AbstractInstancer<D>
- All Implemented Interfaces:
Instancer<D>
- Direct Known Subclasses:
CPUInstancer,GPUInstancer
public abstract class AbstractInstancer<D extends InstanceData>
extends Object
implements Instancer<D>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all instance data without freeing resources.intintintvoidNotify the Instances that some of its data should be removed.protected voidvoidstealInstance(D inOther) Copy a data from another Instancer to this.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.api.Instancer
createInstances, notifyDirty
-
Field Details
-
factory
-
modelData
-
data
-
anyToRemove
protected boolean anyToRemove
-
-
Constructor Details
-
AbstractInstancer
-
-
Method Details
-
createInstance
- Specified by:
createInstancein interfaceInstancer<D extends InstanceData>- Returns:
- a handle to a new copy of this model.
-
stealInstance
Copy a data from another Instancer to this. This has the effect of swapping out one model for another.- Specified by:
stealInstancein interfaceInstancer<D extends InstanceData>- Parameters:
inOther- the data associated with a different model.
-
notifyRemoval
public void notifyRemoval()Description copied from interface:InstancerNotify the Instances that some of its data should be removed.By the time the next frame is drawn, the instanceData passed will no longer be considered for rendering.
- Specified by:
notifyRemovalin interfaceInstancer<D extends InstanceData>
-
clear
public void clear()Clear all instance data without freeing resources. -
getModelVertexCount
public int getModelVertexCount() -
getInstanceCount
public int getInstanceCount() -
getVertexCount
public int getVertexCount() -
removeDeletedInstances
protected void removeDeletedInstances() -
toString
-