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

Method DrawPoints

Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx:402–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402void vtkOpenGLContextDevice3D::DrawPoints(
403 const float* verts, int n, const unsigned char* colors, int nc)
404{
405 // build up temporary vtkDataArrays without copying the data.
406 vtkNew<vtkFloatArray> positionsArray;
407 vtkNew<vtkUnsignedCharArray> colorsArray;
408
409 positionsArray->SetNumberOfComponents(3);
410 positionsArray->SetNumberOfTuples(n);
411 std::copy(verts, verts + n * 3, positionsArray->Begin());
412
413 if (colors != nullptr)
414 {
415 vtkErrorMacro(<< "Here");
416 colorsArray->SetNumberOfComponents(nc);
417 colorsArray->SetNumberOfTuples(n);
418 std::copy(colors, colors + n * nc, colorsArray->Begin());
419 }
420
421 this->DrawPoints(positionsArray, colorsArray, /*cacheIdentifier=*/0);
422}
423
424void vtkOpenGLContextDevice3D::DrawPoints(
425 vtkDataArray* positions, vtkUnsignedCharArray* colors, std::uintptr_t cacheIdentifier)

Callers

nothing calls this directly

Calls 15

EnableDepthBufferMethod · 0.95
ReadyVCBOProgramMethod · 0.95
ReadyVBOProgramMethod · 0.95
SetMatricesMethod · 0.95
DisableDepthBufferMethod · 0.95
vtkglPointSizeMethod · 0.80
copyFunction · 0.50
assertFunction · 0.50
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
BeginMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected