#pragma once

#include "camera.h"
#include "world.h"

struct RaycastHit {
    bool hit = false;

    int blockX = 0;
    int blockY = 0;
    int blockZ = 0;

    int voxelX = 0;
    int voxelY = 0;
    int voxelZ = 0;

    int placeX = 0;
    int placeY = 0;
    int placeZ = 0;

    int placeVoxelX = 0;
    int placeVoxelY = 0;
    int placeVoxelZ = 0;
};

class Raycast {
public:
    static RaycastHit cast(
        const World& world,
        const Camera& camera,
        float maxDistance,
        float stepSize = 0.015625f
    );
};
