MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateBounds

Method UpdateBounds

Common/DataModel/vtkOverlappingAMRMetaData.cxx:1042–1069  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1040
1041//------------------------------------------------------------------------------
1042void vtkOverlappingAMRMetaData::UpdateBounds(int level, int id)
1043{
1044 double bb[6];
1045
1046 unsigned int index = this->GetAbsoluteBlockIndex(level, id);
1047 bool update = false;
1048 if (this->HasBlockBounds(index))
1049 {
1050 const vtkBoundingBox& blockBounds = this->BlockBounds[index];
1051 blockBounds.GetBounds(bb);
1052 update = true;
1053 }
1054 else if (this->HasSpacing(level))
1055 {
1056 vtkAMRBox::GetBounds(
1057 this->GetAMRBox(level, id), this->Origin, this->Spacing->GetTuple(level), bb);
1058 update = true;
1059 }
1060
1061 if (update)
1062 {
1063 for (int i = 0; i < 3; ++i)
1064 {
1065 this->Bounds[i * 2] = std::min(bb[i * 2], this->Bounds[i * 2]);
1066 this->Bounds[i * 2 + 1] = std::max(bb[i * 2 + 1], this->Bounds[i * 2 + 1]);
1067 } // END for each dimension
1068 }
1069}
1070
1071//------------------------------------------------------------------------------
1072void vtkOverlappingAMRMetaData::DeepCopy(vtkAMRMetaData* other)

Callers 3

SetAMRBoxMethod · 0.95
SetBoundsMethod · 0.95
GetBoundsMethod · 0.95

Calls 9

HasBlockBoundsMethod · 0.95
HasSpacingMethod · 0.95
GetAMRBoxMethod · 0.95
GetBoundsFunction · 0.70
minFunction · 0.50
maxFunction · 0.50
GetAbsoluteBlockIndexMethod · 0.45
GetBoundsMethod · 0.45
GetTupleMethod · 0.45

Tested by

no test coverage detected