March 2017
Intermediate to advanced
480 pages
11h 3m
English
A mesh is just a large collection of triangles:

For collision detection, a mesh should be treated as a linear list of triangles. Meshes can be constructed by hand, or loaded from a file. An OBJ loader sample is included with the code accompanying this chapter.
In this section, we are going to declare the Mesh structure that will be used to test for collisions against arbitrary 3D models.
Follow these steps to implement a mesh primitive:
Mesh structure in Geometry3D.h:typedef struct Mesh {int numTriangles;
Read now
Unlock full access