------------------------------------------------------------------------------
| 1070 | |
| 1071 | //------------------------------------------------------------------------------ |
| 1072 | void AddBox(vtkPolyData* pd, double* bounds, int level) |
| 1073 | { |
| 1074 | vtkPoints* pts = pd->GetPoints(); |
| 1075 | vtkCellArray* lines = pd->GetLines(); |
| 1076 | vtkIntArray* levels = vtkArrayDownCast<vtkIntArray>(pd->GetPointData()->GetArray(0)); |
| 1077 | double x[3]; |
| 1078 | vtkIdType cells[8], ids[2]; |
| 1079 | |
| 1080 | x[0] = bounds[0]; |
| 1081 | x[1] = bounds[2]; |
| 1082 | x[2] = bounds[4]; |
| 1083 | cells[0] = pts->InsertNextPoint(x); |
| 1084 | x[0] = bounds[1]; |
| 1085 | x[1] = bounds[2]; |
| 1086 | x[2] = bounds[4]; |
| 1087 | cells[1] = pts->InsertNextPoint(x); |
| 1088 | x[0] = bounds[0]; |
| 1089 | x[1] = bounds[3]; |
| 1090 | x[2] = bounds[4]; |
| 1091 | cells[2] = pts->InsertNextPoint(x); |
| 1092 | x[0] = bounds[1]; |
| 1093 | x[1] = bounds[3]; |
| 1094 | x[2] = bounds[4]; |
| 1095 | cells[3] = pts->InsertNextPoint(x); |
| 1096 | x[0] = bounds[0]; |
| 1097 | x[1] = bounds[2]; |
| 1098 | x[2] = bounds[5]; |
| 1099 | cells[4] = pts->InsertNextPoint(x); |
| 1100 | x[0] = bounds[1]; |
| 1101 | x[1] = bounds[2]; |
| 1102 | x[2] = bounds[5]; |
| 1103 | cells[5] = pts->InsertNextPoint(x); |
| 1104 | x[0] = bounds[0]; |
| 1105 | x[1] = bounds[3]; |
| 1106 | x[2] = bounds[5]; |
| 1107 | cells[6] = pts->InsertNextPoint(x); |
| 1108 | x[0] = bounds[1]; |
| 1109 | x[1] = bounds[3]; |
| 1110 | x[2] = bounds[5]; |
| 1111 | cells[7] = pts->InsertNextPoint(x); |
| 1112 | |
| 1113 | ids[0] = cells[0]; |
| 1114 | ids[1] = cells[1]; |
| 1115 | lines->InsertNextCell(2, ids); |
| 1116 | ids[0] = cells[2]; |
| 1117 | ids[1] = cells[3]; |
| 1118 | lines->InsertNextCell(2, ids); |
| 1119 | ids[0] = cells[4]; |
| 1120 | ids[1] = cells[5]; |
| 1121 | lines->InsertNextCell(2, ids); |
| 1122 | ids[0] = cells[6]; |
| 1123 | ids[1] = cells[7]; |
| 1124 | lines->InsertNextCell(2, ids); |
| 1125 | ids[0] = cells[0]; |
| 1126 | ids[1] = cells[2]; |
| 1127 | lines->InsertNextCell(2, ids); |
| 1128 | ids[0] = cells[1]; |
| 1129 | ids[1] = cells[3]; |
no test coverage detected