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

Method SetDimensions

Common/DataModel/vtkAMRBox.cxx:105–127  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

103
104//------------------------------------------------------------------------------
105void vtkAMRBox::SetDimensions(int ilo, int jlo, int klo, int ihi, int jhi, int khi, int desc)
106{
107 assert(ihi - ilo >= -1 && jhi - jlo >= -1 && khi - klo >= -1);
108 this->LoCorner[0] = ilo;
109 this->LoCorner[1] = jlo;
110 this->LoCorner[2] = klo;
111 this->HiCorner[0] = ihi;
112 this->HiCorner[1] = jhi;
113 this->HiCorner[2] = khi;
114
115 switch (desc)
116 {
117 case vtkStructuredData::VTK_STRUCTURED_XY_PLANE:
118 this->HiCorner[2] = this->LoCorner[2] - 1;
119 break;
120 case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE:
121 this->HiCorner[1] = this->LoCorner[1] - 1;
122 break;
123 case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE:
124 this->HiCorner[0] = this->LoCorner[0] - 1;
125 break;
126 }
127}
128
129//------------------------------------------------------------------------------
130void vtkAMRBox::SetDimensions(const int* lo, const int* hi, int desc)

Calls 1

assertFunction · 0.50

Tested by 15

TestThreadedCopyFunction · 0.36
MakeVolumeFunction · 0.36
GetGridFunction · 0.36
initQuadTreeHTGFunction · 0.36
initOctreeHTGFunction · 0.36
test_rg3dFunction · 0.36
test_rg2d_xyFunction · 0.36
test_rg2d_xzFunction · 0.36
test_rg2d_yzFunction · 0.36
test_rg1d_xFunction · 0.36
test_rg1d_yFunction · 0.36
test_rg1d_zFunction · 0.36