Class to handle a 2D triangle More...
Public Member Functions | |
Triangle2 (Vertex2 a, Vertex2 b, Vertex2 c, short index=-1) | |
Edge2[] | GetEdges () |
get three 2D triangle edges | |
bool | ContainsPoint (Vector2 p) |
http://www.blackpawn.com/texts/pointinpoly/default.html Check if triangle contains given point based on barycentric coordinates | |
Vector2 | ComputeBaryCentric (Vector2 p) |
calculate barycentric of the given point inside the triangle2 |
Public Attributes | |
short | Index |
Vertex2 | A |
Vertex2 | B |
Vertex2 | C |
Class to handle a 2D triangle
Vector2 Clv.Viewer.Math.Triangle2.ComputeBaryCentric | ( | Vector2 | p | ) |
calculate barycentric of the given point inside the triangle2
p |
bool Clv.Viewer.Math.Triangle2.ContainsPoint | ( | Vector2 | p | ) |
http://www.blackpawn.com/texts/pointinpoly/default.html Check if triangle contains given point based on barycentric coordinates
p |
Edge2 [] Clv.Viewer.Math.Triangle2.GetEdges | ( | ) |
get three 2D triangle edges