MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / calculateNormal

Function calculateNormal

src/Loaders/track_utils.cpp:584–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582 }
583
584 glm::vec3 calculateNormal(glm::vec3 p1, glm::vec3 p2, glm::vec3 p3){
585 glm::vec3 vertexNormal(0,0,0);
586
587 glm::vec3 U = p2 - p1;
588 glm::vec3 V = p3 - p1;
589
590 vertexNormal.x = (U.y * V.z) - (U.z * V.y);
591 vertexNormal.y = (U.z * V.x) - (U.x * V.z);
592 vertexNormal.z = (U.x * V.y) - (U.y * V.x);
593
594 return vertexNormal;
595 }
596}

Callers 1

calculateQuadNormalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected