------------------------------------------------------------------------------
| 40 | |
| 41 | //------------------------------------------------------------------------------ |
| 42 | void vtkOctreePointLocatorNode::CreateChildNodes() |
| 43 | { |
| 44 | if (!this->Children) |
| 45 | { |
| 46 | int i; |
| 47 | double midpoint[3]; |
| 48 | for (i = 0; i < 3; i++) |
| 49 | { |
| 50 | midpoint[i] = (this->MinBounds[i] + this->MaxBounds[i]) * .5; |
| 51 | } |
| 52 | this->Children = new vtkOctreePointLocatorNode*[8]; |
| 53 | for (i = 0; i < 8; i++) |
| 54 | { |
| 55 | this->Children[i] = vtkOctreePointLocatorNode::New(); |
| 56 | double NewMin[3], NewMax[3]; |
| 57 | for (int j = 0; j < 3; j++) |
| 58 | { |
| 59 | if (!((i >> j) & 1)) |
| 60 | { |
| 61 | NewMin[j] = this->MinBounds[j]; |
| 62 | NewMax[j] = midpoint[j]; |
| 63 | } |
| 64 | else |
| 65 | { |
| 66 | NewMin[j] = midpoint[j]; |
| 67 | NewMax[j] = this->MaxBounds[j]; |
| 68 | } |
| 69 | } |
| 70 | this->Children[i]->SetMinBounds(NewMin); |
| 71 | this->Children[i]->SetMaxBounds(NewMax); |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | //------------------------------------------------------------------------------ |
| 77 | void vtkOctreePointLocatorNode::DeleteChildNodes() |
nothing calls this directly
no test coverage detected