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

Method GetBinaryData

Web/WebGLExporter/vtkWebGLObject.cxx:161–179  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

159
160//------------------------------------------------------------------------------
161void vtkWebGLObject::GetBinaryData(int part, vtkUnsignedCharArray* buffer)
162{
163 if (!buffer)
164 {
165 vtkErrorMacro("Buffer must not be nullptr.");
166 return;
167 }
168
169 const int binarySize = this->GetBinarySize(part);
170 const unsigned char* binaryData = this->GetBinaryData(part);
171
172 buffer->SetNumberOfComponents(1);
173 buffer->SetNumberOfTuples(binarySize);
174
175 if (binarySize)
176 {
177 std::copy(binaryData, binaryData + binarySize, buffer->GetPointer(0));
178 }
179}
180
181//------------------------------------------------------------------------------
182void vtkWebGLObject::GenerateBinaryData()

Callers 3

GetWebGLBinaryDataMethod · 0.45
WriteDataMethod · 0.45
exportStaticSceneMethod · 0.45

Calls 5

GetBinarySizeMethod · 0.95
copyFunction · 0.50
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected