Rotate / Manipulate selection

On May 7, 2007, at 5:15 PM, Benoît Jacob wrote:

Another thing to investigate in that respect is: maybe the Molecule
could have
a list of the selected atoms – instead of having for each
primitive a bool
telling whether it’s selected. This way, in a molecule having 1000
when 10 atoms are selected, the computation of the center of the
would only have to iterate over those 10 atoms, not over the 1000
atoms in
the molecule.

Actually, I intend to do just that, since it will make many
operations easier, but with one caveat. I’ll make a QList<Primitive*>
for all selected primitives. I’ll keep the existing isSelected bits
in primitive. The code will have to do two things, but it’s not a big

This will also make a number of things easier:

  • renderTransparent (just pass a long a list of selected primitives)
  • “selection modes” where I can pick one atom and select the whole
  • cut (since I need to delete all selected atoms)

I’ll take care of this tomorrow. Should be pretty easy to compute the
center at the same time.