Triangle.cpp 296 B

12345678910
  1. #include "client/rendering/Triangle.h"
  2. Triangle::Triangle() {
  3. }
  4. Triangle::Triangle(const Vertex& a, const Vertex& b, const Vertex& c) : a(a), b(b), c(c) {
  5. normalA = static_cast<Vector3>(b.position - a.position).cross(c.position - a.position);
  6. normalB = normalA;
  7. normalC = normalA;
  8. }