package electrosphere.game.client.world;

import electrosphere.game.server.world.*;
import electrosphere.game.server.terrain.manager.ServerTerrainManager;
import electrosphere.game.server.datacell.ServerDataCell;
import java.util.List;
import org.joml.Vector2f;
import org.joml.Vector3f;

/**
 *
 * @author amaterasu
 */
public class ClientWorldData {

    
    
    /*
    
                       world max
    +---------------------+
    |                     |
    |                     |
    |                     |
    |                     |
    |                     |
    +---------------------+
 world min
    
    
    basically we're saying what the maximum and minimum x and z something can occupy are
    
    FOR THE TIME BEING DOES NOT ACCOUNT FOR Y
    */
    Vector3f worldMinPoint;
    Vector3f worldMaxPoint;
    
    int dynamicInterpolationRatio;
    
    float randomDampener;
    
    
    int worldDiscreteSize;
    

    public ClientWorldData(Vector3f worldMinPoint, Vector3f worldMaxPoint, int dynamicInterpolationRatio, float randomDampener, int worldDiscreteSize) {
        this.worldMinPoint = worldMinPoint;
        this.worldMaxPoint = worldMaxPoint;
        this.dynamicInterpolationRatio = dynamicInterpolationRatio;
        this.randomDampener = randomDampener;
        this.worldDiscreteSize = worldDiscreteSize;
    }
    
    
    
    
    public Vector3f getWorldBoundMin(){
        return worldMinPoint;
    }
    
    public Vector3f getWorldBoundMax(){
        return worldMaxPoint;
    }

    public int getDynamicInterpolationRatio() {
        return dynamicInterpolationRatio;
    }

    public float getRandomDampener() {
        return randomDampener;
    }

    public int getWorldDiscreteSize() {
        return worldDiscreteSize;
    }
    
    
    public int convertRealToChunkSpace(double real){
        return (int)Math.floor(real / dynamicInterpolationRatio);
    }

}
