Synopsis

PDX_MSGT mth_FindActiveRanges(long option, int num_minmax, MTH_3DPNT *minmax, int key_index, int *num_ranges, double **ranges)

Purpose

Find active ranges of MinMax boxes in a specified dimension

Description

The active ranges of MinMax boxes in a specified dimension will be found.

The active range is defined as such that, a plane passing through any point of it in the specific dimension must intersect with the MinMax boxes at least once; otherwise, the range is an inactive one. For example, if X = X0 is a point within one of the active ranges in X dimension, then the plane X = X0 will be intersecting with the MinMax boxes at least once.

The input key_index indicates the dimension, i.e. 0, 1, 2 represent X(U), Y(V), Z dimensions respectively.

Input

option

Options (not used)

num_minmax

The number of MinMax boxes

minmax

The array of Min and Max points, size of 2*num_minmax

key_index

The dimension index number

Output

num_ranges

The number of active ranges along the specified dimension

ranges

The active ranges, size of 2*num_ranges

Return

      MTH_NOERR
      MTH_INVALID_RANGE
      MTH_MINMAX
      MTH_NOMEMORY
      Low level error return
      .fi