------------------------------------------------------------------------------
| 1153 | |
| 1154 | //------------------------------------------------------------------------------ |
| 1155 | bool vtkOverlappingAMRMetaData::FindGrid(double q[3], unsigned int& level, unsigned int& gridId) |
| 1156 | { |
| 1157 | if (!this->HasChildrenInformation()) |
| 1158 | { |
| 1159 | this->GenerateParentChildInformation(); |
| 1160 | } |
| 1161 | |
| 1162 | if (!this->FindGrid(q, 0, gridId)) |
| 1163 | { |
| 1164 | return false; |
| 1165 | } |
| 1166 | |
| 1167 | unsigned int maxLevels = this->GetNumberOfLevels(); |
| 1168 | for (level = 0; level < maxLevels; level++) |
| 1169 | { |
| 1170 | unsigned int n; |
| 1171 | unsigned int* children = this->GetChildren(level, gridId, n); |
| 1172 | if (children == nullptr) |
| 1173 | { |
| 1174 | break; |
| 1175 | } |
| 1176 | unsigned int i; |
| 1177 | for (i = 0; i < n; i++) |
| 1178 | { |
| 1179 | double bb[6]; |
| 1180 | this->GetBounds(level + 1, children[i], bb); |
| 1181 | if (::Inside(q, bb)) |
| 1182 | { |
| 1183 | gridId = children[i]; |
| 1184 | break; |
| 1185 | } |
| 1186 | } |
| 1187 | if (i >= n) |
| 1188 | { |
| 1189 | break; |
| 1190 | } |
| 1191 | } |
| 1192 | return true; |
| 1193 | } |
| 1194 | |
| 1195 | //------------------------------------------------------------------------------ |
| 1196 | bool vtkOverlappingAMRMetaData::FindGrid(double q[3], int level, unsigned int& gridId) |
nothing calls this directly
no test coverage detected