Drawing3d documented Class Library

Triangle.ClockWise Method

Clockwise checks orientation from this respecting to direction. Revises the orientation of the points A, B, C clockwise, relativly to their direction. If we head from A to B and then to C, we can apply the method of the screwdriver. If this direction points at the same side as the param direction, we obtain true as a result.

[Visual Basic]
Public Sub ClockWise( _
   ByVal direction As xyz _
)
[C#]
public bool ClockWise(
   xyz direction
);

Parameters

direction
The direction for the check of clockwise

Return Value

Returns true, if the three points are clockwise oriented

Remarks

Unfortunately we obtain the normal clockwise in 2D, if we take Direction=( 0 , 0, -1) as reference

Example

Triangle t = new Triangle(new xyz(2,0,0), new xyz(0,2,0), new xyz(-2,0,0)); if (t.ClockWise(new xyz(0,0,1))) MessageBox.Show("ClockWise");

See Also

Triangle Class | Drawing3d.Math Namespace