Add GetNormal to Triangle

This commit is contained in:
Wojciech Figat
2022-02-14 10:15:05 +01:00
parent 1168176016
commit 79cacbf36e

View File

@@ -49,6 +49,13 @@ public:
{
}
public:
Vector3 GetNormal() const
{
return Vector3::Normalize((V1 - V0) ^ (V2 - V0));
}
public:
// Determines if there is an intersection between the current object and a Ray