------------------------------------------------------------------------------
| 1885 | |
| 1886 | //------------------------------------------------------------------------------ |
| 1887 | void vtkStructuredAMRGridConnectivity::GetCoarsenedExtent( |
| 1888 | int gridIdx, int fromLevel, int toLevel, int ext[6]) |
| 1889 | { |
| 1890 | assert("pre: grid index is out-of-bounds!" && (gridIdx >= 0) && |
| 1891 | (gridIdx < static_cast<int>(this->NumberOfGrids))); |
| 1892 | assert("pre: toLevel must be >= 0" && (toLevel >= 0)); |
| 1893 | |
| 1894 | // STEP 0: Acquire the grid extent corresponding to the given grid. |
| 1895 | this->GetGridExtent(gridIdx, ext); |
| 1896 | |
| 1897 | // STEP 1: If we are at the same level, we need to do nothing |
| 1898 | if (fromLevel == toLevel) |
| 1899 | { |
| 1900 | return; |
| 1901 | } |
| 1902 | |
| 1903 | // STEP 2: Get the orientation vector and dimension |
| 1904 | int orient[3]; |
| 1905 | int ndim = -1; |
| 1906 | this->GetOrientationVector(this->DataDescription, orient, ndim); |
| 1907 | |
| 1908 | // STEP 3: Coarsen the extent |
| 1909 | this->CoarsenExtent(orient, ndim, fromLevel, toLevel, ext); |
| 1910 | } |
| 1911 | |
| 1912 | //------------------------------------------------------------------------------ |
| 1913 | void vtkStructuredAMRGridConnectivity::CoarsenExtent( |
no test coverage detected