Table of Contents

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

a Point

The first point of the triangle.

b Point

The second point of the triangle.

c Point

The 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

rect Rect

The rectangle to check.

Returns

bool

true if the specified rectangle intersects with the current triangle; otherwise false.

IsCompletelyInside(Rect)

Checks whether the specified rectangle is completely inside the current triangle.

public bool IsCompletelyInside(Rect rect)

Parameters

rect Rect

The rectangle

Returns

bool

true if the specified rectangle is inside the current triangle; otherwise false.

IsPointInside(Point)

Checks whether the specified point is inside the triangle.

public bool IsPointInside(Point p)

Parameters

p Point

The point to be checked.

Returns

bool

true if the specified point is inside the current triangle; otherwise false.

IsRectCompletelyInside(Rect)

Checks whether the specified rectangle is completely inside the current triangle.

public bool IsRectCompletelyInside(Rect rect)

Parameters

rect Rect

The rectangle.

Returns

bool

true if the specified rectangle is inside the current triangle; otherwise false.