GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

PySoy: Box Face Correction

completed by: Samuel Kim

mentors: Amaury Medeiros, Arc Riley, Tony Young, David Czech, Mayank Singh

In libsoy/src/bodies/ the old and new style for Box face layout are described in comments. In short, each side of the box needs to be rendered with its own set of four verticies such that texcoords and tangents can be provided correct for each face.

Write a loop which renders the new faces, face by face, reusing the same code block while changing the affected axis. This should be clear by looking at the comment, though a mentor can explain it in more detail if needed.

Your finished code should provide vertex position (px, py, pz), normals (nx, ny, nz), texcoords (tx, ty), and tangents (ux, uy, uz) for each vertex and render 12 triangles (2 per side) in CCW winding order. Document every step of this fully, there should be at least as many lines of comments as code if not closer to twice as much.

This task is the basis for at least 2 other Box rendering tasks which will be open after this one is complete.

While working on this task you should join and remain in #PySoy on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen.

When you've done, commit your work and post the resulting changeset url to this task.