package electrosphere.game.collision.collidable;

import electrosphere.collision.shapes.CollisionShape;
import electrosphere.dynamics.RigidBody;
import electrosphere.entity.Entity;
import electrosphere.entity.state.collidable.Impulse;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import org.joml.Vector3f;


/**
 *
 * @author satellite
 */
public class Collidable {
    
    Entity parent;
    String type;
    
    List<Impulse> impulses = new CopyOnWriteArrayList();
    
    public static final String TYPE_TERRAIN = "terrain";
    public static final String TYPE_CREATURE = "creature";
    public static final String TYPE_STRUCTURE = "structure";
    public static final String TYPE_ITEM = "item";
    
    
    public Collidable(Entity parent, String type){
        this.parent = parent;
        this.type = type;
    }

    public List<Impulse> getImpulses() {
        return impulses;
    }

    public void addImpulse(Impulse impulse) {
        impulses.add(impulse);
    }

    public Entity getParent() {
        return parent;
    }

    public String getType() {
        return type;
    }
    
    public void clear(){
        impulses.clear();
    }
    
    
    
}
