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

Method RequestDataInternal

Filters/General/vtkReflectionFilter.cxx:133–242  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

131
132//------------------------------------------------------------------------------
133int vtkReflectionFilter::RequestDataInternal(
134 vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6])
135{
136 double constant[3] = { 0.0, 0.0, 0.0 };
137 int mirrorDir[3] = { 1, 1, 1 };
138 int mirrorSymmetricTensorDir[6] = { 1, 1, 1, 1, 1, 1 };
139 int mirrorTensorDir[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
140
141 // Compture transformation
142 switch (this->Plane)
143 {
144 case USE_X_MIN:
145 constant[0] = 2 * bounds[0];
146 break;
147 case USE_X_MAX:
148 constant[0] = 2 * bounds[1];
149 break;
150 case USE_X:
151 constant[0] = 2 * this->Center;
152 break;
153 case USE_Y_MIN:
154 constant[1] = 2 * bounds[2];
155 break;
156 case USE_Y_MAX:
157 constant[1] = 2 * bounds[3];
158 break;
159 case USE_Y:
160 constant[1] = 2 * this->Center;
161 break;
162 case USE_Z_MIN:
163 constant[2] = 2 * bounds[4];
164 break;
165 case USE_Z_MAX:
166 constant[2] = 2 * bounds[5];
167 break;
168 case USE_Z:
169 constant[2] = 2 * this->Center;
170 break;
171 }
172
173 // Compute the element-wise multiplication needed for
174 // vectors/sym tensors/tensors depending on the flipping axis
175 //
176 // For vectors it is as following
177 // X axis
178 // -1 1 1
179 // Y axis
180 // 1 -1 1
181 // Z axis
182 // 1 1 -1
183 //
184 // For symmetric tensor it is as following
185 // X axis
186 // 1 -1 -1
187 // 1 1
188 // 1
189 // Y axis
190 // 1 -1 1

Callers 1

RequestDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected