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

Method FillComponent

Common/Core/vtkDataArray.cxx:726–742  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

724
725//------------------------------------------------------------------------------
726void vtkDataArray::FillComponent(int compIdx, double value)
727{
728 if (compIdx < 0 || compIdx >= this->GetNumberOfComponents())
729 {
730 vtkErrorMacro(<< "Specified component " << compIdx << " is not in [0, "
731 << this->GetNumberOfComponents() << ")");
732 return;
733 }
734
735 // Xcode 8.2 calls GetNumberOfTuples() after each iteration.
736 // Prevent this by storing the result in a local variable.
737 vtkIdType numberOfTuples = this->GetNumberOfTuples();
738 for (vtkIdType i = 0; i < numberOfTuples; i++)
739 {
740 this->SetComponent(i, compIdx, value);
741 }
742}
743
744//------------------------------------------------------------------------------
745void vtkDataArray::Fill(double value)

Callers 15

FillMethod · 0.95
MakeBoundaryMeshMethod · 0.80
TestUSDExporterFunction · 0.80
CopyShapeMethod · 0.80
TestAlembicExporterFunction · 0.80
GetCacheOrReadMethod · 0.80
GetFieldsMethod · 0.80
ReadNewickTreeMethod · 0.80
ReadXMLDataMethod · 0.80
ReadColorElementMethod · 0.80
ReadVectorMethod · 0.80
readSolutionMethod · 0.80

Calls 3

SetComponentMethod · 0.95
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by 15

TestUSDExporterFunction · 0.64
TestAlembicExporterFunction · 0.64
TestColorSeriesFunction · 0.64
AddColumnFunction · 0.64
InsertColumnFunction · 0.64
addCompositeIndexFunction · 0.64
Create1PixelImageFunction · 0.64
addCompositeIndexFunction · 0.64
TestExtractSelectedTreeFunction · 0.64
TestSendReceiveDataArrayFunction · 0.64
InitializePointSetFunction · 0.64