[vtkusers] Creating custom source

Heidler, Kirstin (GE Oil & Gas) Kirstin.Heidler at ge.com
Tue Sep 11 03:29:54 EDT 2012


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.as
px?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 [mailto: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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120911/9c660c98/attachment.htm>


More information about the vtkusers mailing list