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

Method GetLength

Common/DataModel/vtkBond.cxx:35–43  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

33
34//------------------------------------------------------------------------------
35double 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//------------------------------------------------------------------------------
46vtkIdType vtkBond::GetBeginAtomId() const

Callers 15

PrintSelfMethod · 0.95
WritePolyLODSeriesMethod · 0.45
TestPropItemFunction · 0.45
TestContextAreaFixedRectFunction · 0.45
TestContextAreaFunction · 0.45
mainFunction · 0.45

Calls 2

GetAtomPositionMethod · 0.80
sqrtFunction · 0.50

Tested by 10

TestPropItemFunction · 0.36
TestContextAreaFixedRectFunction · 0.36
TestContextAreaFunction · 0.36
TestPointWidgetFunction · 0.36
MoleculeExampleCode1Function · 0.36
MoleculeExampleCode2Function · 0.36