<html>
<body>
Hello Ken,<br><br>
Good catch - this is a bug. I have corrected it (yes - the "2"
and "3" should have been "1" and "2") 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> transform->MultiplyPoint( in,
zero );<br>
zero[0] /= zero[3];<br>
zero[2] /= zero[3]; //it is queer here.<br>
zero[3] /= zero[3];<br>
viewDirection[0] -= zero[0];<br>
viewDirection[1] -= zero[1];<br>
viewDirection[2] -= zero[2];<br>
<br>
Shoud I change them to:<br>
transform->MultiplyPoint( in, zero );<br>
zero[0] /= zero[3];<br>
zero[1] /= zero[3]; <br>
zero[2] /= zero[3];<br>
viewDirection[0] -= zero[0];<br>
viewDirection[1] -= zero[1];<br>
viewDirection[2] -= zero[2];<br>
<br>
Regards,<br>
Ken<br>
<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>