[vtkusers] Creating a Lego Brick out of vtk primitives

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu Jun 9 07:39:49 EDT 2011


Hi Daniel,

I guess, you are missing the actors and the renderer. (vtkPanel)
Give a look at the example that you can find on the VTK wiki or inside
the source/Wrapping/Java/vtk/SimpleVTK.java

Seb

On Thu, Jun 9, 2011 at 6:32 AM, Daniel Zuidinga
<daniel.zuidinga at rwth-aachen.de> wrote:
> Hello vtk users,
>
> i try building a lego brick with vtk primitives and addinputconnection. Is
> inputconnection the wrong method to add geometry-data to a mapper?
> Nothing is shown when i add a inputconnection.
>
> my code (java):
>
>        vtkCubeSource cube = new vtkCubeSource();
>        vtkPolyDataMapper mapper = new vtkPolyDataMapper();
>        mapper.SetInputConnection(cube.GetOutputPort());
>
>        vtkCylinderSource src2 = new vtkCylinderSource();
>        vtkPolyDataMapper mapper2 = new vtkPolyDataMapper();
>        mapper.AddInputConnection(src2.GetOutputPort());
>
>
> regards
> daniel
> _______________________________________________
> 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
>



More information about the vtkusers mailing list