cogl: Adds _cogl_util_point_in_polygon API
authorRobert Bragg <robert@linux.intel.com>
Thu, 13 Jan 2011 14:29:46 +0000 (14:29 +0000)
committerRobert Bragg <robert@linux.intel.com>
Fri, 21 Jan 2011 16:18:11 +0000 (16:18 +0000)
commit23ed01d4e933da803bb7bbe4d0439de0824532c1
tree031e7dea370bfbe3cab724f2e30a7daab0cb4ebb
parent142b229c5c2684f94af32358d1401b61aa3019aa
cogl: Adds _cogl_util_point_in_polygon API

This adds a utility function that can determine if a given point
intersects an arbitrary polygon, by counting how many edges a
"semi-infinite" horizontal ray crosses from that point. The plan is to
use this for a software based read-pixel fast path that avoids using the
GPU to rasterize journaled primitives and can instead intersect a point
being read with quads in the journal to determine the correct color.
clutter/cogl/cogl/Makefile.am
clutter/cogl/cogl/cogl-point-in-poly-private.h [new file with mode: 0644]
clutter/cogl/cogl/cogl-point-in-poly.c [new file with mode: 0644]