Polygon Module of libSIMDx86

The Polygon module of libSIMDx86 gives functions to accelerate simple polygon operations.

#include <SIMDx86/polygon.h>

typedef struct SIMDx86Polygon


SIMDx86Vector a, b, c; /* Points of the polygon */

} SIMDx86Polygon;

void SIMDx86Polygon_PlaneNormal(SIMDx86Vector* pNormal, const SIMDx86Polygon* pPoly)

Calculates the normal of 'pPoly' and stores the result in 'pNormal' by the following formula:

Let D0 and D1 be vectors, and A, B, C be points on the polygon:

D0 = a - b

D1 = c – b

Normal = Cross(D0, D1)