From: Pendergraft, J. <JPe...@sj...> - 2010-04-08 14:27:11
|
Over the years I have done quite a bit of work where scalar (int, long) types were much preferred to floating due to hardware performance. I solve the "coarseness" problem simply by considering the scale/unit according to the current domain. That is you need not represent a micron with 0.000001 if your code considers 1 as = 1 micron and 1000000 = 1 meter. Jerry Pendergraft voice:651-756-3212 St.Jude Medical mobil:651-491-0163 Atrial Fibrillation Division email:jpe...@sj... 1350 Energy Lane St.Paul, MN 55108 -----Original Message----- From: Emmanuel Pietriga [mailto:emm...@in...] Sent: Thu 08-Apr-10 00:34 To: zvt...@li... Subject: Re: [zvtm-devel] why long rather than double Work on zvtm started 10 years ago, and such choices were made based on the assumption that doing a lot of arithmetics on long, + not having to round() values in some situations, would be faster than doing all this with doubles. The difference is probably fairly insignificant now, but changing this is a lot of work. It is on our todo list though. re. coarseness when zooming in: potentially yes, if you zoom relatively far beyond the 1:1 scale (negative camera altitudes). What I usually do is to have camera altitude 0 as the "floor"/max zoom level, and size objects (in absolute virtual space coordinates) accordingly. This way, this potential problem of coarseness never occurs. Emmanuel On 8 avr. 2010, at 01:22, Travis Wellman wrote: > Hello, > > I'm just getting into zvtm and I'm running across the use of longs in > coordinates. Why is this? > > It seems to me that coordinates based on whole numbers would become > coarse when zooming in. > > Travis > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > zvtm-devel mailing list > zvt...@li... > https://lists.sourceforge.net/lists/listinfo/zvtm-devel -- Emmanuel Pietriga INRIA Saclay - Projet In Situ http://www.lri.fr/~pietriga ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ zvtm-devel mailing list zvt...@li... https://lists.sourceforge.net/lists/listinfo/zvtm-devel This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system. |