Synopsis

int mth_LoopInLoop(long option, long num_pnts_loop1, MTH_2DPNT (*loop1_pnts), long num_pnts_loop2, MTH_2DPNT (*loop2_pnts), double on_tol)

Purpose

Determine if a 2D loop is in another loop of 2D points.

Description

Performs a loop in loop test to determine if a 2D loop is in/on/out of another loop of 2D points. The first loop is considered on the second loop if the first loop touches (within on_tol tolerance) or crosses the second loop.

Input

option

Not used.

num_pnts_loop1

The number of 2D points in the first loop

loop1_pnts

The first 2D loop of points

num_pnts_loop2

The number of 2D points in the second loop

loop2_pnts

The second 2D loop of points to check the first loop of 2D points against

on_tol

The loop on loop tolerance

Return

      -2 - Error
      -1 - Outside of the loop
       0 - On the loop
       1 - Inside the loop
       .fi