#pragma once

#include "blitz/maths/Vector.h"

namespace blitz {
namespace maths {

struct Ray {
	Vec3f origin;
	Vec3f direction;
};

struct AABB {
	Vec3f from;
	Vec3f to;
};

inline AABB operator+(const AABB& aabb, const Vec3f& offset) {
	AABB result = aabb;
	result.from += offset;
	result.to += offset;
	return result;
}

float Distance(const Ray& ray, const AABB& aabb);

bool Intersects(const Ray& ray, const AABB& aabb);

}  // namespace maths
}  // namespace blitz
