#include <vector>
#include "globals.h"
#include "util_math.h"
using std::vector;
struct ClipVertex {
vec4f pos;
vec3f color;
vec3f normal;
vec2f uv;
float inv_w;
};
// canonical view volume
float plane_x_min(const vec4f &v);
float plane_x_max(const vec4f &v);
float plane_y_min(const vec4f &v);
float plane_y_max(const vec4f &v);
float plane_z_min(const vec4f &v);
float plane_z_max(const vec4f &v);
vector<ClipVertex> clip_polygon_with_attrs(
vec4f *clip_positions, vec2f *input_uv, vec3f input_color, vec3f input_normal
);