[vtkusers] Some queer codes in vtkEncodedGradientShader.h.
Lisa Avila
lisa.avila at kitware.com
Fri May 6 16:44:39 EDT 2005
Hello Ken,
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.... :-)
Lisa
At 05:46 AM 4/29/2005, wuyingcai wrote:
>Hi all,
>When I read the VTK source code, I found some queer codes from ln293 to
>ln299 in
><mk:@MSITStore:C:\Documents%20and%20Settings\ken\Desktop\VTKDoc-4.2.chm::/vtkEncodedGradientShader_8h-source.html>vtkEncodedGradientShaderh.
>I listed the codes as follows.
> transform->MultiplyPoint( in, zero );
> zero[0] /= zero[3];
> zero[2] /= zero[3]; //it is queer here.
> zero[3] /= zero[3];
> viewDirection[0] -= zero[0];
> viewDirection[1] -= zero[1];
> viewDirection[2] -= zero[2];
>
>Shoud I change them to:
> transform->MultiplyPoint( in, zero );
>zero[0] /= zero[3];
> zero[1] /= zero[3];
> zero[2] /= zero[3];
> viewDirection[0] -= zero[0];
> viewDirection[1] -= zero[1];
> viewDirection[2] -= zero[2];
>
>Regards,
>Ken
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050506/db20a343/attachment.htm>
More information about the vtkusers
mailing list