Complex Logarithmic View
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Public Attributes
Clv.Viewer.Math.Triangle2 Class Reference

Class to handle a 2D triangle More...

List of all members.

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

Detailed Description

Class to handle a 2D triangle


Member Function Documentation

Vector2 Clv.Viewer.Math.Triangle2.ComputeBaryCentric ( Vector2  p)

calculate barycentric of the given point inside the triangle2

Parameters:
p
Returns:
uv vector with barycentric coordinates
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

Parameters:
p
Returns:
true if point is inside the triangle
Edge2 [] Clv.Viewer.Math.Triangle2.GetEdges ( )

get three 2D triangle edges

Returns:
Edge-Array with three edges based on vertices

The documentation for this class was generated from the following file: