[vtkusers] Z-Scaling in VTK
Bruno da Silva de Oliveira
bruno at esss.com.br
Mon Sep 19 12:06:10 EDT 2005
Hi all,
I'm working with meshes that represent petroleum reservoirs. One of the
characteristics of this type of model is that the X and Y dimensions are
orders of magnitude greater than the Z dimensions (petroleum reservoirs
are several kilometers wide, but few meters deep). To visualize this
type of model, we employ z-scale, or vertical exaggeration, which
consists in scaling the model along the Z axis.
I understand this can be achieved in VTK by setting the transformation
of each actor, but one problem that I see with this approach is that
other components of the visualization don't know about this. For
instance, a vtkImplicitPlaneWidget doesn't know about the scaling along
the Z-Axis, so the plane it returns is wrong regarding the world
geometry. I know that you can apply the inverse of the scaling to get
the correct plane, but I would like to know if another solution is possible.
I guess a perfect solution would be to set some kind of transform that
is applied to the render, that scales all the objects in the world. This
way, all the other components of the visualization would just work. Is
this already implemented somewhere that I missed? Otherwise, how can I
extend vtk to achieve this? Looking quickly at the code, one could add a
WorldTransform matrix to the vtkViewport class and update all its
functions that deal with world coordinates to take in account this new
matrix, and also update the vtkRenderer class to apply this matrix
before rendering the actors. Am I correct?
I'm using VTK 4.2 btw.
Thanks in advance,
--
Bruno da Silva de Oliveira
bruno at esss.com.br
ESSS - Engineering Simulation and Scientific Software
http://www.esss.com.br
More information about the vtkusers
mailing list