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

Method Build3DCellPoints

Filters/HyperTree/vtkHyperTreeGridFeatureEdges.cxx:379–398  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

377
378//----------------------------------------------------------------------------------------------
379vtkSmartPointer<vtkPoints> vtkHyperTreeGridFeatureEdges::Build3DCellPoints(
380 vtkHyperTreeGridNonOrientedMooreSuperCursor* cursor)
381{
382 vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
383 points->SetNumberOfPoints(8);
384
385 // Retrieve intercept tuple and type
386 double* cellOrigin = cursor->GetOrigin();
387 double* cellSize = cursor->GetSize();
388
389 for (int ptId = 0; ptId < 8; ptId++)
390 {
391 double pt[3] = { cellOrigin[0] + (ptId & 1) * cellSize[0],
392 cellOrigin[1] + ((ptId >> 1) & 1) * cellSize[1],
393 cellOrigin[2] + ((ptId >> 2) & 1) * cellSize[2] };
394 points->SetPoint(ptId, pt);
395 }
396
397 return points;
398}
399
400//----------------------------------------------------------------------------------------------
401void vtkHyperTreeGridFeatureEdges::InsertNewEdge(

Callers 1

Calls 5

NewFunction · 0.50
SetNumberOfPointsMethod · 0.45
GetOriginMethod · 0.45
GetSizeMethod · 0.45
SetPointMethod · 0.45

Tested by

no test coverage detected