Newer
Older
#pragma once
#include "../camera/Ray.h"

Yoel
committed
#include "Mat4.h"
#include "Vec3.h"
namespace util {
class AxisAlignedBoundingBox {
public:
AxisAlignedBoundingBox();

Yoel
committed
AxisAlignedBoundingBox(const Vec3& min, const Vec3& max);

Yoel
committed
AxisAlignedBoundingBox operator+(const AxisAlignedBoundingBox& rhs) const;
AxisAlignedBoundingBox operator*(const Mat4& rhs) const;

Yoel
committed
bool intersects(const cam::Ray& r) const;
bool contains(const Vec3& v) const;
Vec3 minBound() const;
Vec3 maxBound() const;
private:

Yoel
committed
Vec3 min, max;