Open mbh1620 opened 1 year ago
Need to use a Vertex Class for the input https://github.com/mbh1620/Final-Year-Project/issues/5
Testing on a cube obj showing that the normals calculated are the same as provided in the obj file!
obj file normals
calculated normals
Important to realise that in this function there will be two triangles for every quad in the obj file. This is why there is two values calculated for every single normal in the obj file.
Also important to remember that in the obj file, these are vertex normals not face normals.
A function used to work out the normal of a triangle.
Multiple other sub functions will also be needed to complete this function:
Input: 3 3D vertices (in a Vector data type)
Output: A 3D Vector (in a Vector data type)