Java 类com.badlogic.gdx.graphics.g3d.particles.batches.BillboardParticleBatch 实例源码

项目:libgdxcn    文件:FlameMain.java   
protected JPanel getPanel (ParticleBatch renderer) {
    if(renderer instanceof PointSpriteParticleBatch){
        return new EmptyPanel(this, "Point Sprite Batch", "It renders particles as point sprites.");
    }
    if(renderer instanceof BillboardParticleBatch){
        return new BillboardBatchPanel(this, (BillboardParticleBatch) renderer);
    }
    else if(renderer instanceof ModelInstanceParticleBatch){
        return new EmptyPanel(this, "Model Instance Batch", "It renders particles as model instances.");
    }

    return null;
}
项目:libgdxcn    文件:ParticleControllerTest.java   
@Override
public void create () {
    super.create();
    emitters = new Array<ParticleController>();
    assets.load(DEFAULT_PARTICLE, Texture.class);
    assets.load(DEFAULT_SKIN, Skin.class);
    loading = true;
    environment = new Environment();
    environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0f, 0f, 0.1f, 1f));
    environment.add(new DirectionalLight().set(1f, 1f, 1f,  0, -0.5f, -1 ));
    billboardParticleBatch = new BillboardParticleBatch();
    billboardParticleBatch.setCamera(cam);
    ui = new Stage();
    builder = new StringBuilder();
}
项目:Skyland    文件:ParticleUtils.java   
public void initBillBoardParticles(Camera camera) {
    BillboardParticleBatch billboardParticleBatch = new BillboardParticleBatch();
    billboardParticleBatch.setCamera(camera);
    particleSystem.add(billboardParticleBatch);
    initManager();
}
项目:Alien-Ark    文件:PlanetScreen.java   
private void initParticles() {
    // particles
    particleSystem = ParticleSystem.get();
    particleSpriteBatch = new BillboardParticleBatch();

    particleSpriteBatch.setCamera(camera);
    particleSystem.add(particleSpriteBatch);

    assetManager = new AssetManager();
    ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches());
    ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver());
    assetManager.setLoader(ParticleEffect.class, loader);
    assetManager.load("particles/3D/rocket_thruster.pfx", ParticleEffect.class, loadParam);
    assetManager.load("particles/3D/rocket_explosion.pfx", ParticleEffect.class, loadParam);
    assetManager.load("particles/3D/planet_portal.pfx", ParticleEffect.class, loadParam);
    assetManager.finishLoading();

    effectThrust = new ParticleEffect[3];
    effectThrust[0] =       ((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();
    effectThrust[1] =       ((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();
    effectThrust[2] =       ((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();

    effectExplosion =   ((ParticleEffect) assetManager.get("particles/3D/rocket_explosion.pfx")).copy();
    effectPortal =      ((ParticleEffect) assetManager.get("particles/3D/planet_portal.pfx")).copy();
    effectExplosion.init();

    for (ParticleEffect e : effectThrust) {
        e.init();
        e.start();


        particleSystem.add(e);

    }

    effectPortal.init();
    effectPortal.start();
    effectPortal.translate(new Vector3(-30, 0, 135));
    effectPortal.rotate(Vector3.Z, 90);
    effectPortal.rotate(Vector3.X, 30);
    effectPortal.scale(2f, 2f, 2f);


    particleSystem.add(effectPortal);
}
项目:libgdxcn    文件:BillboardRenderer.java   
public BillboardRenderer(BillboardParticleBatch batch){
    this();
    setBatch(batch);
}
项目:libgdxcn    文件:BillboardRenderer.java   
@Override
public boolean isCompatible (ParticleBatch<?> batch) {
    return batch instanceof BillboardParticleBatch;
}
项目:libgdxcn    文件:FlameMain.java   
public BillboardParticleBatch getBillboardBatch () {
    return renderer.billboardBatch;
}
项目:libgdxcn    文件:BillboardBatchPanel.java   
public BillboardBatchPanel (FlameMain particleEditor3D, BillboardParticleBatch renderer) {
    super(particleEditor3D, "Billboard Batch", "Renderer used to draw billboards particles.");
    initializeComponents(renderer);
    setValue(renderer);
}