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

Method SetCellOrderAndRationalWeights

Common/DataModel/vtkDataSet.cxx:510–602  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

508
509//------------------------------------------------------------------------------
510void vtkDataSet::SetCellOrderAndRationalWeights(vtkIdType cellId, vtkGenericCell* cell)
511{
512 switch (cell->GetCellType())
513 {
514 // Set the degree for Lagrange elements
515 case VTK_LAGRANGE_QUADRILATERAL:
516 {
517 vtkHigherOrderQuadrilateral* cellBezier =
518 dynamic_cast<vtkHigherOrderQuadrilateral*>(cell->GetRepresentativeCell());
519 // Set the degrees
520 cellBezier->SetOrderFromCellData(
521 this->GetCellData(), cell->PointIds->GetNumberOfIds(), cellId);
522 break;
523 }
524 case VTK_LAGRANGE_WEDGE:
525 {
526 vtkHigherOrderWedge* cellBezier =
527 dynamic_cast<vtkHigherOrderWedge*>(cell->GetRepresentativeCell());
528 // Set the degrees
529 cellBezier->SetOrderFromCellData(
530 this->GetCellData(), cell->PointIds->GetNumberOfIds(), cellId);
531 break;
532 }
533 case VTK_LAGRANGE_HEXAHEDRON:
534 {
535 vtkHigherOrderHexahedron* cellBezier =
536 dynamic_cast<vtkHigherOrderHexahedron*>(cell->GetRepresentativeCell());
537 // Set the degrees
538 cellBezier->SetOrderFromCellData(
539 this->GetCellData(), cell->PointIds->GetNumberOfIds(), cellId);
540 break;
541 }
542
543 // Set the degree and rational weights for Bezier elements
544 case VTK_BEZIER_QUADRILATERAL:
545 {
546 vtkIdType numPts = cell->PointIds->GetNumberOfIds();
547 vtkBezierQuadrilateral* cellBezier =
548 dynamic_cast<vtkBezierQuadrilateral*>(cell->GetRepresentativeCell());
549 // Set the degrees
550 cellBezier->SetOrderFromCellData(this->GetCellData(), numPts, cellId);
551 // Set the weights
552 cellBezier->SetRationalWeightsFromPointData(GetPointData(), numPts);
553 break;
554 }
555 case VTK_BEZIER_HEXAHEDRON:
556 {
557 vtkIdType numPts = cell->PointIds->GetNumberOfIds();
558 vtkBezierHexahedron* cellBezier =
559 dynamic_cast<vtkBezierHexahedron*>(cell->GetRepresentativeCell());
560 // Set the degrees
561 cellBezier->SetOrderFromCellData(this->GetCellData(), numPts, cellId);
562 // Set the weights
563 cellBezier->SetRationalWeightsFromPointData(GetPointData(), numPts);
564 break;
565 }
566 case VTK_BEZIER_WEDGE:
567 {

Callers 4

GetCellMethod · 0.80
vtkContourGridExecuteFunction · 0.80

Calls 6

GetPointDataFunction · 0.85
GetCellTypeMethod · 0.45
SetOrderFromCellDataMethod · 0.45
GetCellDataMethod · 0.45
GetNumberOfIdsMethod · 0.45

Tested by

no test coverage detected