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

Method InsertPoint

Common/DataModel/vtkGenericEdgeTable.cxx:564–587  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

562
563//------------------------------------------------------------------------------
564void vtkGenericEdgeTable::InsertPoint(vtkIdType ptId, double point[3])
565{
566 vtkIdType pos = this->HashFunction(ptId);
567
568 // Need to check size first
569 // this->HashPoints->Resize( pos );
570 assert(
571 "check: valid range pos" && static_cast<unsigned>(pos) < this->HashPoints->PointVector.size());
572
573 // Be careful with reference the equal is not overloaded
574 vtkEdgeTablePoints::VectorPointTableType& vect = this->HashPoints->PointVector[pos];
575
576 // Need to check size again
577 // Here we just puch_back at the end,
578 // the vector should not be very long and should not contain any empty spot.
579 PointEntry newEntry(this->NumberOfComponents); // = vect.back();
580 newEntry.PointId = ptId;
581 memcpy(newEntry.Coord, point, sizeof(double) * 3);
582 newEntry.Reference = 1;
583
584 // vtkDebugMacro( << "Inserting Point:" << ptId << ":"
585 // << point[0] << "," << point[1] << "," << point[2] );
586 vect.push_back(newEntry);
587}
588
589//------------------------------------------------------------------------------
590void vtkGenericEdgeTable::RemovePoint(vtkIdType ptId)

Callers

nothing calls this directly

Calls 4

HashFunctionMethod · 0.95
assertFunction · 0.50
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected