package electrosphere.data.entity.particle;

import org.joml.Vector3d;

import electrosphere.data.color.ColorRange;
import electrosphere.data.math.ScalarGenerator;

/**
 * Describes a particle emitter
 */
public class ParticleEmitter {
    
    /**
     * The name of the particle type
     */
    String name;
    
    /**
     * The maximum life of the particle
     */
    Integer maxLife;
    
    /**
     * The life the particle starts with
     */
    Integer lifeCurrent;


    /**
     * The initial velocity of the particle
     */
    Vector3d particleVelocity;

    /**
     * The acceleration of the particle
     */
    Float acceleration;

    /**
     * The texture of the particle
     */
    String texture;

    /**
     * The size of the particle
     */
    Float size;

    /**
     * The color of the particle
     */
    Vector3d color;

    /**
     * The number of particles to emit per frame
     */
    Float frequency;

    /**
     * The gravity applied to the particle
     */
    Vector3d gravity;

    /**
     * The range of allowed colors
     */
    ColorRange colorRange;

    /**
     * The value of transparency given time
     */
    ScalarGenerator transparency;

    /**
     * The value of scale given time
     */
    ScalarGenerator scale;

    /**
     * The amount the emitter can vary the initial velocity
     */
    Float spread;

    /**
     * The acceleration to/from the center of the emitter
     */
    Float radialAcceleration;

    /**
     * The offset from the base of the entity to emit from
     */
    Vector3d offset;

    /**
     * Gets the max life of the particle
     * @return The max life
     */
    public Integer getMaxLife(){
        return maxLife;
    }

    /**
     * Gets the starting life of the particle
     * @return The starting life
     */
    public Integer getLifeCurrent(){
        return lifeCurrent;
    }

    /**
     * Gets the starting velocity of the particle
     * @return The starting velocity
     */
    public Vector3d getParticleVelocity(){
        return particleVelocity;
    }

    /**
     * Gets the acceleration of the particle
     * @return The acceleration
     */
    public Float getAcceleration(){
        return acceleration;
    }

    /**
     * Gets the texture of the particle
     * @return The texture
     */
    public String getTexture(){
        return texture;
    }

    /**
     * Gets the name of the particle type
     * @return The name of the particle type
     */
    public String getName(){
        return name;
    }

    /**
     * Gets the size of the particle
     * @return The size of the particle
     */
    public Float getSize(){
        return size;
    }

    /**
     * Gets the number of particles to emit per frame
     * @return The number of particles to emit per frame
     */
    public Float getFrequency(){
        return frequency;
    }

    /**
     * Gets the color of the particles generated by the emitted
     * @return The color
     */
    public Vector3d getColor(){
        return color;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setMaxLife(Integer maxLife) {
        this.maxLife = maxLife;
    }

    public void setLifeCurrent(Integer lifeCurrent) {
        this.lifeCurrent = lifeCurrent;
    }

    public void setParticleVelocity(Vector3d particleVelocity) {
        this.particleVelocity = particleVelocity;
    }

    public void setAcceleration(Float acceleration) {
        this.acceleration = acceleration;
    }

    public void setTexture(String texture) {
        this.texture = texture;
    }

    public void setSize(Float size) {
        this.size = size;
    }

    public void setColor(Vector3d color) {
        this.color = color;
    }

    public void setFrequency(Float frequency){
        this.frequency = frequency;
    }

    public Vector3d getGravity() {
        return gravity;
    }

    public void setGravity(Vector3d gravity) {
        this.gravity = gravity;
    }

    public ColorRange getColorRange() {
        return colorRange;
    }

    public void setColorRange(ColorRange colorRange) {
        this.colorRange = colorRange;
    }

    public ScalarGenerator getTransparency() {
        return transparency;
    }

    public void setTransparency(ScalarGenerator transparency) {
        this.transparency = transparency;
    }

    public ScalarGenerator getScale() {
        return scale;
    }

    public void setScale(ScalarGenerator scale) {
        this.scale = scale;
    }

    public Float getSpread() {
        return spread;
    }

    public void setSpread(Float spread) {
        this.spread = spread;
    }

    public Float getRadialAcceleration() {
        return radialAcceleration;
    }

    public void setRadialAcceleration(Float radialAcceleration) {
        this.radialAcceleration = radialAcceleration;
    }

    public Vector3d getOffset() {
        return offset;
    }

    public void setOffset(Vector3d offset) {
        this.offset = offset;
    }

    

    

}
