March 2017
Intermediate to advanced
480 pages
11h 3m
English
Triangles are one of the most important primitive shapes for 3D graphics. A triangle can be represented by three non linear points. Triangles are special because they are co-planar. This means that the three points of a triangle always lie on the same plane:

We are going to implement a triangle that is defined by three points. To make this structure more convenient to use, we can declare an anonymous union. This union will let us access the members of the Triangle struct in different ways.
Follow these steps to implement a 3D triangle:
Triangle structure in Geometry3D.h:typedef struct Triangle { union ...Read now
Unlock full access