<html>
<body>
Hello Ken,<br><br>
Good catch - this is a bug. I have corrected it (yes - the &quot;2&quot;
and &quot;3&quot; should have been &quot;1&quot; and &quot;2&quot;) I
guess it is a good thing that zero[3] would be 1 except in some very
unusual circumstances.... :-)<br><br>
Lisa<br><br>
<br>
At 05:46 AM 4/29/2005, wuyingcai wrote:<br>
<blockquote type=cite class=cite cite=""><font face="arial" size=1>Hi
all,<br>
When I read the VTK source code, I found some queer codes from ln293 to
ln299 in
</font>
<a href="mk:@MSITStore:C:\Documents%20and%20Settings\ken\Desktop\VTKDoc-4.2.chm::/vtkEncodedGradientShader_8h-source.html">
vtkEncodedGradientShaderh</a><font face="arial" size=1>.<br>
I listed the codes as follows.<br>
</font><font face="arial" size=2>&nbsp; transform-&gt;MultiplyPoint( in,
zero );<br>
&nbsp; zero[0] /= zero[3];<br>
&nbsp; zero[2] /= zero[3];&nbsp;&nbsp; //it is queer here.<br>
&nbsp; zero[3] /= zero[3];<br>
&nbsp; viewDirection[0] -= zero[0];<br>
&nbsp; viewDirection[1] -= zero[1];<br>
&nbsp; viewDirection[2] -= zero[2];<br>
&nbsp;<br>
Shoud I change them to:<br>
&nbsp; transform-&gt;MultiplyPoint( in, zero );<br>
zero[0] /= zero[3];<br>
&nbsp; zero[1] /= zero[3];&nbsp;&nbsp; <br>
&nbsp; zero[2] /= zero[3];<br>
&nbsp; viewDirection[0] -= zero[0];<br>
&nbsp; viewDirection[1] -= zero[1];<br>
&nbsp; viewDirection[2] -= zero[2];<br>
&nbsp;<br>
Regards,<br>
Ken<br>
&nbsp;<br>
</font>_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ" eudora="autourl">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" eudora="autourl">
http://www.vtk.org/mailman/listinfo/vtkusers</a></blockquote></body>
</html>