[This is preliminary documentation and is subject to change.]

Determines whether a polygon is convex.

Namespace: org.critterai.geom
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static bool IsConvex(
	Vector3[] vertices,
	int startVert,
	int vertCount
)
Public Shared Function IsConvex ( _
	vertices As Vector3(), _
	startVert As Integer, _
	vertCount As Integer _
) As Boolean
public:
static bool IsConvex(
	array<Vector3>^ vertices, 
	int startVert, 
	int vertCount
)

Parameters

vertices
array<Vector3>[]()[][]
An array of vertices that contains a representation of polygons with an arbitrary number of sides. Wrap direction does not matter.
startVert
Int32
The index of the first vertex in the polygon.
vertCount
Int32
The number of vertices in the polygon.

Return Value

True if the polygon is convex.

Remarks

Behavior is undefined if vertices are not coplanar.

This method may improperly return false if the area of the triangle formed by the first three vertices of the polygon is too small to detect on both the (x, z) and (x, y) planes.

See Also