esthermations / cargame-ada

An experimental 3D engine in want of a game. Written in Ada!
7 stars 0 forks source link

Support quads in Wavefront OBJ models #4

Open esthermations opened 4 years ago

esthermations commented 4 years ago

It's pretty common for programs to export OBJ models that use quads.

A really naive solution to this, which I'm obviously going to use, is to just turn the quad into two triangles. I am very intelligent.

esthermations commented 4 years ago

Essentially the problem exists here where we define a Face as an array of three Face_Components. Theoretically it could be any number ≥ 3, and we just need an algorithm to convert any Face into a series of triangles, with the simplest case being that it already is a triangle.

Okie doke, that's the challenge. Woo!