Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created June 13, 2020 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/7a1445278e69694e1768a9cdd77ab9d9 to your computer and use it in GitHub Desktop.
Save chuongmep/7a1445278e69694e1768a9cdd77ab9d9 to your computer and use it in GitHub Desktop.
XYZ MedianPoint( MeshTriangle triangle )
{
XYZ p = XYZ.Zero;
p += triangle.get_Vertex( 0 );
p += triangle.get_Vertex( 1 );
p += triangle.get_Vertex( 2 );
p *= 0.3333333333333333;
return p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment