[vtkusers] Changing the direction of Z

Jim Peterson jimcp at cox.net
Tue Oct 26 07:39:04 EDT 2010


Paul Harris wrote:
>
>
> On 23 October 2010 22:59, Jim Peterson <jimcp at cox.net 
> <mailto: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> <mailto: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.
>
>
>
> 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).
>
The essential problem is the handedness of a model is a priori 
knowledge. If you can identify the models that need to be reversed by 
file type or name, or if you could add an additional control statement 
to the model to identify the need for reversal, you could extend the 
reader for that data  to process the command or extend the reader to 
implicitly ivert the coordinates in the reader.
> 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.
>
I am reading the "due to lighting problems" as a description of the 
symptom observed because the transform scale at the actor does not 
appear to affect the normals of the objects, only the coordinates.
> thanks
> Paul
>

Hope that helps,
Jim



More information about the vtkusers mailing list