/** Assign one batch, among those passed in, to each controller. The batch must be compatible with the controller to be * assigned. */ public void setBatch (Array<ParticleBatch<?>> batches) { for (ParticleController controller : controllers) { for (ParticleBatch<?> batch : batches) if (controller.renderer.setBatch(batch)) break; } }
/** Updates the renderer used by this controller, usually this means the particles will be draw inside a batch. */ public void draw () { if (particles.size > 0) { renderer.update(); } }
@SuppressWarnings("unchecked") public boolean setBatch (ParticleBatch<?> batch) { if (isCompatible(batch)) { this.batch = (T)batch; return true; } return false; }
@Override public ParticleControllerComponent copy () { return new BillboardRenderer(batch); }
@Override public ParticleControllerComponent copy () { return new PointSpriteRenderer(batch); }
@Override public ParticleControllerComponent copy () { return new ParticleControllerControllerRenderer(); }
@Override public ParticleControllerComponent copy () { return new ModelInstanceRenderer(batch); }
public PointSpriteRenderer (PointSpriteParticleBatch batch) { this(); setBatch(batch); }
public BillboardRenderer (BillboardParticleBatch batch) { this(); setBatch(batch); }
public ModelInstanceRenderer (ModelInstanceParticleBatch batch) { this(); setBatch(batch); }
@Override public ParticleControllerComponent copy () { return new BillboardRenderer(batch); }
@Override public ParticleControllerComponent copy () { return new PointSpriteRenderer(batch); }
@Override public ParticleControllerComponent copy () { return new ParticleControllerControllerRenderer(); }
@Override public ParticleControllerComponent copy () { return new ModelInstanceRenderer(batch); }
/** Assign one batch, among those passed in, to each controller. The batch must be compatible with the controller to be * assigned. */ public void setBatch (Array<ParticleBatch<?>> batches) { for (ParticleController controller : controllers) { for (ParticleBatch<?> batch : batches) if (controller.renderer.setBatch(batch)) break; } }
/** Updates the renderer used by this controller, usually this means the particles will be draw inside a batch. */ public void draw () { if (particles.size > 0) { renderer.update(); } }
@SuppressWarnings("unchecked") public boolean setBatch (ParticleBatch<?> batch) { if (isCompatible(batch)) { this.batch = (T)batch; return true; } return false; }
public PointSpriteRenderer (PointSpriteParticleBatch batch) { this(); setBatch(batch); }
public BillboardRenderer (BillboardParticleBatch batch) { this(); setBatch(batch); }
public ModelInstanceRenderer (ModelInstanceParticleBatch batch) { this(); setBatch(batch); }