#include <DirectXMath.h>
#include "macro.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_center X coordinate of the point.
     * @param y_center Y coordinate of the point.
     * @param z_center Z coordinate of the point.
     * @param radius Radius of the point (for bounding sphere).
     * @param tolerance Tolerance value for the check.
     * @return True if the point is inside the frustum, otherwise false.
     */
    bool CheckCube(float x_center, float y_center, float z_center, float radius, float tolerance);

private:
    XMVECTOR m_planes[6];
};