[vtkusers] Creating custom source

Hal Canary hal at cs.unc.edu
Tue Sep 11 09:09:24 EDT 2012


Another option is to start with a vtkArrowSource and a vtkConeSource, 
apply transforms to get them lined up as you want, then use 
vtkAppendPolyData to join them into one glyph, which you can then pass 
into your glyph filter.


On 09/11/2012 03:29 AM, Heidler, Kirstin (GE Oil & Gas) wrote:
> Hello Tolga,
>
> yes you can create a custom Source. I did so already twice.
>
> I recommend you take a look at the vtkArrowSource. That should give you
> an idea of how to create an arrow and how to make it two-tipped.
>
> Here you can find the ArrowSource(and other Sources if you need more
> inspiration):
>
> http://www.koders.com/cpp/fid8455FF37BD948E7A11BD65E84A481C730D969674.aspx?s=mdef%3Atree
>
> When creating a source it is important to set the Points and the
> according Cells correctly. If you want shading to work properly you
> should also set the normals for each point. And if you want to map
> textures the texture coordinates.
>
> Cheers,
>
> Kirstin
>
> > Von: vtkusers-bounces at vtk.org
> > Im Auftrag von  Tolga Kurt
> > Gesendet: Dienstag, 11. September 2012 01:52
> > An: vtkusers at vtk.org
> > Betreff: [vtkusers] Creating custom source
> >
> > Hello,
> >
> > I am working on a GUI for a Finite Element Method application. So
> > that, I need to draw forces and moments acting on vertices.
> >
> > For forces, i simply put oriented arrows but I need to put a
> > different shape for acting moments. As a universal convention,
> > moments are shown with arrows which have 2 tips. (Simple arrows in
> > VTK have 1 tip as you know.)
> >
> > Now I wonder, if I can create a customArrowSource with 2 tips. If I
> >  cannot, what can anyone suggest me?
> >
> > Thanks,
> >
> > Tolga Kurt.



More information about the vtkusers mailing list