[vtkusers] RenderWindow WeakPointer

Pelt, R.F.P. van R.F.P.v.Pelt at tue.nl
Sun Oct 12 02:58:38 EDT 2008


Dear all,

 

I have a class that is derived from vtkOpenGLTexture. 

In that class I have a constructor, which sets the RenderWindow pointer
(defined in the parent class) to NULL.

 

Migrating to VTK 5.2.0 I noticed that this is changed to be a
vtkWeakPointer type. Now I get the following error

while setting the pointer to NULL (in the descendant class):

 

[error]

Types pointed to are unrelated; conversion requires reinterpret_cast,
C-style cast or function-style cast

        C:\vtkWin32_520\Common\vtkWeakPointer.h(46) : while compiling
class-template member function 'vtkWeakPointer<T>
&vtkWeakPointer<T>::operator =(T *)'

        with

        [

            T=vtkRenderWindow

        ]

        c:\vtkWin32_520\Rendering\vtkOpenGLTexture.h(65) : see reference
to class template instantiation 'vtkWeakPointer<T>' being compiled

        with

        [

            T=vtkRenderWindow

        ]

[/error]

 

I've tried all the suggested cast types. I've also tried to use
reinterpret_cast<vtkRenderWindow *>(this->RenderWindow.GetPointer()),

in order reset the pointer afterwards. All methods did not succeed.

 

Any suggestion how to handle this situation?

 

Kind regards,

 

Roy

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081012/016f437e/attachment.htm>


More information about the vtkusers mailing list