[vtkusers] New() method in vtk class hierarchy
David Cole
david.cole at kitware.com
Fri Aug 11 09:18:29 EDT 2006
Most VTK classes use "vtkStandardNewMacro" in their .cxx file to
implement the static New method... You can use the same macro in classes
of yours that derive from VTK classes...
Does that answer your question?
HTH,
David
Xiaobin Wang wrote:
> Hi all,
> I am writing my own derived class . I find the sensible part in the
> code lies in
> the New() method.
>
> I looked into some class source code in vtk (e.g. vtkCone,vtkShpere)
> ,and found
> New methods there just be declared in header files but not defined .
> Out of curiosity,
> I want to know when calling the New(), how does vtk return a new object ?
>
> I believe it is the C++ problems (maybe involving static member
> functions) ,but hope some one here can help me to clarify this problem.
>
> Thanks in advance and looking forward to hearing from you.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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
>
>
More information about the vtkusers
mailing list