[vtkusers] Changing the direction of Z

Paul Harris harris.pc at gmail.com
Mon Oct 25 22:40:50 EDT 2010


On 23 October 2010 22:59, Jim Peterson <jimcp at cox.net> wrote:

> Paul Harris wrote:
>
>
>>
>> On 19 October 2010 06:31, Jim Peterson <jimcp at cox.net <mailto:
>> jimcp at cox.net>> wrote:
>>
>>    Paul Harris wrote:
>>
>>
>>        My models do not have any particular handedness, ...
>>
>>    all 3D models have a "handedness" Right handed says the  positive
>>    Y axis is a 90degree rotation counter clockwise from the positive
>>    X axis, the positive Z axis is 90 degrees counter clockwise from
>>    the  X/Y plane along the  Y positive axis. "Left handed" is the
>>    same rule with "counter clockwise" replaced with "clockwise". you
>>    trasnform between the two by either reversing the direction of Z
>>    or exchanging X and Y.
>>
>>
>> Ok well in that case, some of the models I view are right-handed, some are
>> left-handed.  I need to support both.
>> I might have no choice but to insist on whatever VTK is happy with.
>>
> Paul,
> the essential problem here is the input polydata (at whatever point that
> exists is the manifestation in the current world coordinate system of the
> objects represented by the numbers generated by the original coordinate
> system. The vtkPolyDataFilter is designed to adjust all model related
> aspects of the poly data, it needs to be applied to the poly data, not the
> actor. My reasoning is multiple input objects, some right handed, some left
> handed, may be processed as inputs to the same mapper or actor. So in my
> Java reinterpretation of your program, the dark  surface problem is resolved
> by applying the vtkPolydata filter to the output of the cone source, and
> using the output of the filter in the mapper.... as:
>


So you are saying that whatever coordinates that are passed to actors must
already be in VTK's world coordinate system, which is fixed.   If I need to
(eg) flip the entire scene (all of the models), I can't adjust the world
coordinate system, instead I must adjust all of the models instead (eg via
vtkPolyDataFilter).

I was hoping that I could adjust the world coordinate system - you can do it
at the camera (eg adding a Yaw for 3d glasses), but that trick doesn't work
if you have to flip one of the axes due to lighting problems.

thanks
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101026/da975821/attachment.htm>


More information about the vtkusers mailing list