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

Method WritePrimaryElementAttributes

IO/XML/vtkXMLHyperTreeGridWriter.cxx:273–304  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

271
272//------------------------------------------------------------------------------
273void vtkXMLHyperTreeGridWriter::WritePrimaryElementAttributes(ostream& os, vtkIndent indent)
274{
275 this->Superclass::WritePrimaryElementAttributes(os, indent);
276 vtkHyperTreeGrid* input = this->GetInput();
277
278 int extent[6];
279 input->GetExtent(extent);
280
281 if (this->GetDataSetMajorVersion() < 1) // Major version < 1
282 {
283 this->WriteScalarAttribute("Dimension", (int)input->GetDimension());
284 this->WriteScalarAttribute("Orientation", (int)input->GetOrientation());
285 }
286
287 this->WriteScalarAttribute("BranchFactor", (int)input->GetBranchFactor());
288 this->WriteScalarAttribute("TransposedRootIndexing", input->GetTransposedRootIndexing());
289 this->WriteVectorAttribute(
290 "Dimensions", 3, (int*)const_cast<unsigned int*>(input->GetDimensions()));
291 if (input->GetHasInterface())
292 {
293 this->WriteStringAttribute("InterfaceNormalsName", input->GetInterfaceNormalsName());
294 }
295 if (input->GetHasInterface())
296 {
297 this->WriteStringAttribute("InterfaceInterceptsName", input->GetInterfaceInterceptsName());
298 }
299
300 if (this->GetDataSetMajorVersion() < 1)
301 {
302 this->WriteScalarAttribute("NumberOfVertices", input->GetNumberOfCells());
303 }
304}
305
306//------------------------------------------------------------------------------
307int vtkXMLHyperTreeGridWriter::WriteGrid(vtkIndent indent)

Callers

nothing calls this directly

Calls 11

GetInputMethod · 0.95
WriteScalarAttributeMethod · 0.80
WriteVectorAttributeMethod · 0.80
GetHasInterfaceMethod · 0.80
WriteStringAttributeMethod · 0.80
GetExtentMethod · 0.45
GetDimensionMethod · 0.45
GetOrientationMethod · 0.45
GetDimensionsMethod · 0.45
GetNumberOfCellsMethod · 0.45

Tested by

no test coverage detected