package electrosphere.server.pathfinding.navmesh;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author satellite
 */
public class NavMesh {
    
    //nav method, ie walking, flying, climbing, swimming, etc
    String method;
    
    List<NavShape> navNodes = new LinkedList<NavShape>();
    List<NavMesh> meshNeighbors = new LinkedList<NavMesh>();
    
    public void addMeshNeighbor(NavMesh neighbor){
        meshNeighbors.add(neighbor);
    }
    
    public List<NavMesh> getMeshNeighbors(){
        return meshNeighbors;
    }
    
    public void addNode(NavShape node){
        navNodes.add(node);
    }
    
    public List<NavShape> getNodes(){
        return navNodes;
    }
    
    public boolean containsPoint(double x, double y, double z){
        for(NavShape shape : navNodes){
            if(shape.containsPoint(x, y, z)){
                return true;
            }
        }
        return false;
    }
    
}
