[vtkusers] vtkOBJReader example for C++

Sergey Programmer croooter at gmail.com
Wed Jul 14 03:40:29 EDT 2010


Thank you, Bill!

My mistake was that I looked into GetOutput() from debugger, zeros in most
fields confused me. However, the structure was okay and after I added actor
and updated renderer, data appeared.

Regards,
C


On Tue, Jul 13, 2010 at 5:00 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> http://www.vtk.org/Wiki/VTK/Examples/IO/ReadOBJ
>
> On Tue, Jul 13, 2010 at 8:44 AM, Sergey Programmer <croooter at gmail.com>
> wrote:
> > Hi all!
> >
> > Can anybody provide an example (C++ would be perfect) how to read OBJ
> files
> > using vtkOBJReader? I'm trying the following with no success:
> >
> > My class extends vtkOBJReader, in the Open method I do
> >
> >     SetFileName( fname.c_str() );
> >     Update();
> >     vtkDataObject * src = GetOutput();
> >
> > and then src is 0 even after I specified correct filename. What am I
> doing
> > wrong?
> >
> > Regards,
> > C
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100714/4a7020d7/attachment.htm>


More information about the vtkusers mailing list