#include <DirectXMath.h>
using namespace DirectX;

class frustum
{
public:
    /**
     * Create a frustum object.
     * @param screenDepth
     * @param projectionMatrix 
     * @param viewMatrix 
     */
    void ConstructFrustum(float screenDepth, XMMATRIX projectionMatrix, XMMATRIX viewMatrix);
    /**
     * Check if a point is inside the frustum.
     * @param x X coordinate of the point.
     * @param y Y coordinate of the point.
     * @param z Z coordinate of the point.
     * @return True if the point is inside the frustum, otherwise false.
     */
    bool CheckCube(float xCenter, float yCenter, float zCenter, float radius, float tolerance);

private:
    XMVECTOR m_planes[6];
};