------------------------------------------------------------------------------
| 33 | |
| 34 | //------------------------------------------------------------------------------ |
| 35 | double vtkBond::GetLength() const |
| 36 | { |
| 37 | // Reimplement here to avoid the potential cost of building the EdgeList |
| 38 | // (We already know the atomIds, no need to look them up) |
| 39 | double pos1[3], pos2[3]; |
| 40 | this->Molecule->GetAtomPosition(this->BeginAtomId, pos1); |
| 41 | this->Molecule->GetAtomPosition(this->EndAtomId, pos2); |
| 42 | return std::sqrt(vtkMath::Distance2BetweenPoints(pos1, pos2)); |
| 43 | } |
| 44 | |
| 45 | //------------------------------------------------------------------------------ |
| 46 | vtkIdType vtkBond::GetBeginAtomId() const |