AtomIterators.h (pymol-v2.1.0.tar.bz2) | : | AtomIterators.h (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
// advance the internal state to the next atom, return false if there is no | // advance the internal state to the next atom, return false if there is no | |||
// next atom | // next atom | |||
virtual bool next() = 0; | virtual bool next() = 0; | |||
// get current atom | // get current atom | |||
AtomInfoType * getAtomInfo() { | AtomInfoType * getAtomInfo() { | |||
return obj->AtomInfo + atm; | return obj->AtomInfo + atm; | |||
}; | }; | |||
// get current atom | ||||
const AtomInfoType * getAtomInfo() const { | ||||
return obj->AtomInfo + atm; | ||||
}; | ||||
// get current atom's coordinates | // get current atom's coordinates | |||
float * getCoord() { | float * getCoord() { | |||
return cs->Coord + (3 * idx); | return cs->Coord + (3 * idx); | |||
}; | }; | |||
// get current atom index in object molecule | // get current atom index in object molecule | |||
int getAtm() { | int getAtm() const { | |||
return atm; | return atm; | |||
} | } | |||
// get current coordinate index (atom index in coordset) | // get current coordinate index (atom index in coordset) | |||
int getIdx() { | int getIdx() const { | |||
return idx; | return idx; | |||
} | } | |||
}; | }; | |||
/* | /* | |||
* State specific iterator over an atom selection. Similar to cmd.iterate_state. | * State specific iterator over an atom selection. Similar to cmd.iterate_state. | |||
* If state is -1 then iterate over all states. | * If state is -1 then iterate over all states. | |||
* | * | |||
* SeleCoordIterator iter(G, sele, state); | * SeleCoordIterator iter(G, sele, state); | |||
* while(iter.next()) { | * while(iter.next()) { | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 7 lines changed or added |