Template Function t8_normal_of_tri(const TVecP1&, const TVecP2&, const TVecP3&, TVecNormal&)

Function Documentation

template<T8VecType<3> TVecP1, T8VecType<3> TVecP2, T8VecType<3> TVecP3, T8VecType<3> TVecNormal>
static inline void t8_normal_of_tri(const TVecP1 &p1, const TVecP2 &p2, const TVecP3 &p3, TVecNormal &normal)

Compute the normal of a triangle given by its three vertices.

Parameters:
  • p1[in] A 3D vector.

  • p2[in] A 3D vector.

  • p3[in] A 3D vector.

  • normal[out] vector of the triangle. (Not necessarily of length 1!)d