/* ----------------------------------------------------------------------------- * * Copyright (c) 2019 Alexis Naveros. * Portions developed under contract to the SURVICE Engineering Company. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * * ----------------------------------------------------------------------------- */ enum { PW_RESULT_OUTSIDE, PW_RESULT_ON, PW_RESULT_INSIDE }; /* To use the faster _Padding functions, memory must be valid beyond vertexlist by PW_STORAGE_PADDING_BYTES bytes */ #define PW_STORAGE_PADDING_BYTES (64) /* Type double for both contour and point */ int pwPointInContourD( double *vertexlist, size_t vertexcount, double pointx, double pointy ); /* Type int64_t for both contour and point */ int pwPointInContour64_Padding( int64_t *vertexlist, size_t vertexcount, int64_t pointx, int64_t pointy ); int pwPointInContour64( int64_t *vertexlist, size_t vertexcount, int64_t pointx, int64_t pointy ); /* Type int32_t for both contour and point */ int pwPointInContour32( int32_t *vertexlist, size_t vertexcount, int32_t pointx, int32_t pointy );