/** * Sets the type of mesh used by the particle emitter. * @param meshType The mesh type to use */ public void setMeshType(ParticleMesh.Type meshType) { this.meshType = meshType; switch (meshType) { case Point: particleMesh = new ParticlePointMesh(); this.setMesh(particleMesh); break; case Triangle: particleMesh = new ParticleTriMesh(); this.setMesh(particleMesh); break; default: throw new IllegalStateException("Unrecognized particle type: " + meshType); } this.setNumParticles(particles.length); }
/** * Sets the type of mesh used by the particle emitter. * @param meshType The mesh type to use */ public void setMeshType(ParticleMesh.Type meshType) { this.meshType = meshType; switch (meshType) { case Point: particleMesh = new ParticlePointMesh(); this.setMesh(particleMesh); break; case Triangle: particleMesh = new ParticleTriMesh(); this.setMesh(particleMesh); break; default: throw new IllegalStateException("Unrecognized particle type: " + meshType); } this.setNumParticles(particles.length); }
/** * Sets the type of mesh used by the particle emitter. * @param meshType The mesh type to use */ public void setMeshType(ParticleMesh.Type meshType) { this.meshType = meshType; switch (meshType) { case Point: particleMesh = new ParticlePointMesh(); this.setMesh(particleMesh); break; case Triangle: particleMesh = new ParticleTriMesh(); this.setMesh(particleMesh); break; default: throw new IllegalStateException("Unrecognized particle type: " + meshType); } this.setNumParticles(particles.length); }