Hi Gilleain,

Thanks, this works, and rendering is already better with regard to scaling.




On 25 October 2010 14:07, gilleain torrance <gilleain.torrance@gmail.com> wrote:
Hi Nina,

Yes, the fastest approach is to just transform the model coordinates,
then render normally. The GeometryTools class has methods to move
containers around like this, but be warned that the translateTo method
has a problem that it uses the 'center of mass' (sum of coordinates /
number of atoms) rather than the center of the bounding box; see the
get2DCenter method.

I would recommend code like this:
a) find bounding box of each connected component (for single atoms,
padded with some margin)
b) layout these bounding boxes to get a list of points
c) move the atom containers to these points

steps b) and c) can be combined. To move the atom container, use
GeometryTools, but use the translate2D methods rather than the
translate2DCenterTo method.


Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
Cdk-devel mailing list