The GetCalibPieces function retrieves the boundaries of the calibration pieces of a particular axis given by the parameter dim. The variable array CalPieces returns the indices of the calibration boundaries and the corresponding world coordinates. The array is automatically resized and contains the data in the following format:
The function returns the number of calibration pieces. A value of -1 is returned if the calibration table is not initialized (which should never occur under normal circumstances).