[vtkusers] left handed coordiante system and vtkAxesActor lighting issue
Gerrick Bivins
Gerrick.Bivins at halliburton.com
Thu May 9 08:25:41 EDT 2013
Hello,
I'm trying to allow the user to switch between left handed and right handed coordinate display in my application.
To do this, I'm simply applying a transform to the camera "ModelViewTransform" that negates the z axis.
That works fine. My issue is that I've done something similar to orient the vtkAxesActor similarly but the lighting is incorrect.
If I setup the axes as such:
vtkAxesActor axes = new vtkAxesActor();
vtkTransform lefthanded = new vtkTransform();
lefthanded.Identity();
vtkMatrix4x4 matrix = lefthanded.GetMatrix();
matrix.SetElement(0, 0, -1);
matrix.SetElement(1, 1, 1);
axes.SetUserTransform(lefthanded);
axes.SetShaftTypeToCylinder();
axes.SetXAxisLabelText("x");
axes.SetYAxisLabelText("y");
axes.SetZAxisLabelText("z");
axes.SetCylinderRadius(.05);
axes.SetTotalLength(1.5, 1.5, 1.5);
each part of the axis is rendered "black".
I can partially work around this by setting the shaft to render as a line:
axes.SetShaftTypeToLine();
but the tips are still black.
Is there some setting I'm missing to get the lighting correct here?
Gerrick
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130509/e45ae1ae/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: axis-line-but-tip-still-black-lh.png
Type: image/png
Size: 13204 bytes
Desc: axis-line-but-tip-still-black-lh.png
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130509/e45ae1ae/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: axis-cylinder-lh.png
Type: image/png
Size: 13497 bytes
Desc: axis-cylinder-lh.png
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130509/e45ae1ae/attachment-0001.png>
More information about the vtkusers
mailing list