OENearestBond

class OENearestBond

The OENearestBond class, used by OEGetNearestBond and OEGetNearbyBond functions. It stores a bond pointer, the associated distance and the display position of the bond.

Constructors

OENearestBond() -> OENearestBond
OENearestBond(bond: OEBondBase, dist: float) -> OENearestBond
OENearestBond(bond: OEBondBase, dist: float, pos: OE2DPoint) -> OENearestBond
OENearestBond(arg2: OENearestBond) -> OENearestBond

Constructors.

If no display position is given then it will be initialized to OE2DPoint(0.0, 0.0).

GetBond

GetBond() -> OEBondBase

Returns the bond pointer stored in the OENearestBond object.

GetDisplayPosition

GetDisplayPosition() -> OE2DPoint

Returns the display position of the middle of the nearest bond.

GetDist

GetDist() -> float

Returns the distance associated with the bond.

IsValid

IsValid() -> bool

Returns whether the OENearestBond object is initialized correctly.