[vtkusers] Problem with vtkPolyDataMapper
David E DeMarle
dave.demarle at kitware.com
Fri Sep 14 06:24:45 EDT 2012
On Friday, September 14, 2012, Nickabilla wrote:
> Hello guys!
>
> I am new to VTK and also to C++ and wanted to do visualisation of a point
> cloud. I have VTK set up in Visual Studio 2010 with all the project
> settings
> correct. At least i think i do because when i run this example:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Math/NormalizeVector it all works
> fine. However when i try to visualize a cone:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone the program
> gives this exception:
>
> Unhandled exception at 0x004115ed in vtk_test.exe: 0xC0000005: Access
> violation reading location 0x00000000.
>
> The exception is on this line and refers to the 'mapper' object:
>
> mapper->SetInputConnection(coneSource->GetOutputPort());
This is because vtkRenderingOpenGL, the implementation of the
vtkRenderingCore module, isn't linked.
Try using this find command in your cmakelists.txt.
find_package(VTK 6.0 REQUIRED NO_MODULE)
See http://vtk.org/Wiki/VTK/Build_System_Migration for an explanation of
what the heck I'm talking about.
> I also tried it like this and it doesn't work either:
>
> mapper->SetInputConnection(0,coneSource->GetOutputPort(0));
>
> I am using VTK 6.0. Does anyone have a clue to what i am doing wrong or
> maybe the example is outdated?
>
>
Technically you aren't using 6.0, you are using the development head
version which will become 6.0 once it stabilizes and we put it in a nice
shiny box.
Many thanks in advance,
>
> Nick
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Problem-with-vtkPolyDataMapper-tp5716082.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
--
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120914/bec35351/attachment.htm>
More information about the vtkusers
mailing list