I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 vertices equal to each other for a degenerate quad.
For the 3D engine, I'm in need of clipping for polygons outside of clip space volume in order to avoid vertex inversion and division by zero errors when performing the perspective divide.
My logic is that I first identify the primitives that intersect with the 6 planes. From there I add edges to cut the primitive. What I don't understand at this point is how to cut/add quads. Do I need to "triangulate", but for quads? Is it possible? Are there constraints other than the quad needing to be convex?
Edit: I might be over complicating this. I can't come up with a case where I get less than 4 or more than 4 vertices when clipping. The only case is when all points are outside the clipping area, all except one edge. That edge would produce a triangle.