Improve documentation clarity for vtkCamera::GetProjectionTransformMatrix(vtkRenderer* ren)
vtkMatrix4x4* vtkCamera::GetProjectionTransformMatrix(vtkRenderer* ren)
(see here) has different return semantics than its counterpart vtkMatrix4x4* vtkCamera::GetProjectionTransformMatrix(double aspect, double nearz, double farz)
(see here and here)
One would expect that the returned pointer is non-owning in both functions, as there is nothing in the documentation to the contrary. However, the first version that takes a vtkRenderer*
as parameter returns an owning pointer and requires the user to delete said pointer. The second version that takes the three double
s returns a non-owning pointer and requires the user not delete it. This difference should be specified in the documentation.
In addition, possibly the VTK_NEWINSTANCE macro should be used on the first version.