private cvSubdiv2DLocate ( IntPtr subdiv, PointF pt, IntPtr &edge, IntPtr &vertex ) : CvEnum.Subdiv2DPointLocationType | ||
subdiv | IntPtr | |
pt | PointF | |
edge | IntPtr | |
vertex | IntPtr | |
return | CvEnum.Subdiv2DPointLocationType |
/// <summary> /// Locates input point within subdivision /// </summary> /// <param name="pt">The point to locate</param> /// <param name="subdiv2DEdge">The output edge the point falls onto or right to</param> /// <param name="subdiv2DPoint">Optional output vertex double pointer the input point coincides with</param> /// <returns>The type of location for the point</returns> public CvEnum.Subdiv2DPointLocationType Locate(ref PointF pt, out MCvSubdiv2DEdge?subdiv2DEdge, out MCvSubdiv2DPoint?subdiv2DPoint) { IntPtr edge; IntPtr vertex = new IntPtr(); CvEnum.Subdiv2DPointLocationType res = CvInvoke.cvSubdiv2DLocate(Ptr, pt, out edge, ref vertex); subdiv2DEdge = (edge == IntPtr.Zero) ? null : (MCvSubdiv2DEdge?)Marshal.PtrToStructure(edge, typeof(MCvSubdiv2DEdge)); subdiv2DPoint = (vertex == IntPtr.Zero) ? null : (MCvSubdiv2DPoint?)Marshal.PtrToStructure(vertex, typeof(MCvSubdiv2DPoint)); return(res); }