MantisBT - VTK
View Issue Details
0013499VTK(No Category)public2012-10-09 10:002014-10-02 15:43
mneugeba2 
Cory Quammen 
normalminorhave not tried
closedfixed 
 
6.1.0 
TBD
incorrect functionality
0013499: VTK 5.10: vtkPlane: projectVector function rescales the plane normal
When using the projectVector function of an vtkPlane instance, the normal vector of this instance is rescaled (i.e. length is unequal to 1).
The reason for this is the usage of vtkMath::MultiplyScalar(normal, dotProd); in the implementation of the projectVector function. This rescales the normal-vector of the plane. I recommend to use a copy of the normal-vector for MultiplyScalar instead of the original double[3]. A simple vtkMath::normalize(normal) afterwards wouldn't do the job, since the normal could be flipped.
No tags attached.
Issue History
2012-10-09 10:00mneugeba2New Issue
2013-06-25 14:12Dave DeMarleNote Added: 0031061
2014-10-02 15:43Cory QuammenNote Added: 0033530
2014-10-02 15:43Cory QuammenStatusbacklog => closed
2014-10-02 15:43Cory QuammenAssigned To => Cory Quammen
2014-10-02 15:43Cory QuammenResolutionopen => fixed
2014-10-02 15:43Cory QuammenFixed in Version => 6.1.0

Notes
(0031061)
Dave DeMarle   
2013-06-25 14:12   
Thanks. Would you mind submitting the suggested fix in gerrit to facilitate automated testing and review?
For details on how to do so see http://www.vtk.org/Wiki/VTK/Git/Develop [^]
(0033530)
Cory Quammen   
2014-10-02 15:43   
Fixed in commit:

commit ba3c24c3f0739718a482d2f8e8f33f024bcbf8cf
Author: David Gobbi <david.gobbi@gmail.com>
Date: Tue Jul 30 22:26:03 2013 -0600

    ProjectVector method was modifying plane normal.
    
    Thanks to David Jarvis for pointing out this bug. Projecting a vector
    would cause the plane's normal to be multiplied by the dotprod of the
    plane and the vector (in some cases, causing the normal to become zero).
    Obviously the ProjectVector() function should not modify the normal.
    
    Change-Id: Idaa86fdad897777a65fba6f8ac5309a3582175e6