Struct Triangle
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Represents a triangle in two-dimensional space.
public readonly struct Triangle
- Inherited Members
- Extension Methods
Constructors
Triangle(Point, Point, Point)
Initializes a new instance of the Triangle structure.
public Triangle(Point a, Point b, Point c)
Parameters
aPointThe first point of the triangle.
bPointThe second point of the triangle.
cPointThe third point of the triangle.
Properties
P1
Gets the first point of the triangle.
public Point P1 { get; }
Property Value
- Point
The point.
P2
Gets the second point of the triangle.
public Point P2 { get; }
Property Value
- Point
The point.
P3
Gets the third point of the triangle.
public Point P3 { get; }
Property Value
- Point
The point.
Methods
IntersectsWith(Rect)
Indicates whether the specified rectangle intersects with the current triangle.
public bool IntersectsWith(Rect rect)
Parameters
rectRectThe rectangle to check.
Returns
- bool
trueif the specified rectangle intersects with the current triangle; otherwisefalse.
IsCompletelyInside(Rect)
Checks whether the specified rectangle is completely inside the current triangle.
public bool IsCompletelyInside(Rect rect)
Parameters
rectRectThe rectangle
Returns
- bool
trueif the specified rectangle is inside the current triangle; otherwisefalse.
IsPointInside(Point)
Checks whether the specified point is inside the triangle.
public bool IsPointInside(Point p)
Parameters
pPointThe point to be checked.
Returns
- bool
trueif the specified point is inside the current triangle; otherwisefalse.
IsRectCompletelyInside(Rect)
Checks whether the specified rectangle is completely inside the current triangle.
public bool IsRectCompletelyInside(Rect rect)
Parameters
rectRectThe rectangle.
Returns
- bool
trueif the specified rectangle is inside the current triangle; otherwisefalse.