[vtkusers] Problem displaying actors with large coordinates values ?

pof jd379252 at gmail.com
Mon Jun 29 17:34:21 EDT 2009


Dear vtk'ers,

I need to display actors that are built from vtkPoints::New(VTK_DOUBLE) 
and that have large coordinate values (typically in the range 1e6 to 
1e7, coming from Digital Elevation Model), although the scene extent 
(xmax-xmin, ymax-ymin, zmax-zmin) is in the order of (1e3, 1e3, 1e3).

When displaying such objects in a scene, everything looks fine at first 
sight.
However, as soon as some rotation and zooming are applied with the mouse 
action, the scene becomes less neat, and there are some random overlaps 
(i.e. it is changing as the viewpoint is changed) between actors.

So far, the only way I found to get rid off these nasty artifacts is to 
perform a translation of the vtkPoints instance, such that its 
coordinates values become much smaller.
However, I would really prefer to avoid such translation to save memory, 
as I need to keep the original data (i.e. untranslated data points).

To solve this, I'm thinking about some possibilities, so far unsuccessful:
- Perform the translation at the actor's level, but I have not found any 
method to do that.
- Force the actor display to use 'double' reals as I guess it is 
presently using 'float' reals (note that I'm already using 'double' 
vtkPoints instead of 'float', though it hardly has any effect on the 
displayed artifacts)

Does anybody has a clever idea or comment that could point me towards 
the right direction?
Thanks,
P.F.



More information about the vtkusers mailing list