[vtkusers] Some queer codes in vtkEncodedGradientShader.h.

wuyingcai wycken at msn.com
Fri Apr 29 05:46:20 EDT 2005


Hi all,

When I read the VTK source code, I found some queer codes from ln293 to
ln299 in vtkEncodedGradientShader.h
<mk:@MSITStore:C:\Documents%20and%20Settings\ken\Desktop\VTKDoc-4.2.chm::/vt
kEncodedGradientShader_8h-source.html> .

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050429/2a575052/attachment.htm>


More information about the vtkusers mailing list