[vtkusers] Drawing a single triangle

Gerrick Bivins gbivins at objectreservoir.com
Wed Jan 7 21:31:27 EST 2009


You have to create a data set (vtkPolyData) and add the triangle as a cell
and the points are specified as well.
Look hear for an example:
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/DataManipu
lation/Python/BuildUGrid.py?root=VTK&content-type=text/plain

Gerrick

On 1/7/09 8:18 PM, "Kerry Loux" <louxkr at gmail.com> wrote:

> Hello,
> 
> For my application, I need to display a single triangle in 3-space.  The
> triangle is not necessarily equilateral.  What is the easiest way to create a
> triangle object?  I considered vtkTriangle and vtkTriangleStrip, but I'm not
> clear on how to assign the locations of the vertices.  Also, as far as I can
> tell the vtkTriangle (and vtkCell) classes don't have any kind of GetOutput()
> function.  How do you map these classes to an actor?  I was hoping for some
> kind of primitive shape source, similar to vtkCyliderSource or
> vtkSphereSource, but there doesn't seem to be any.
> 
> I'm still using the 5.0.4 release.
> 
> Thanks for your advice!
> 
> -Kerry
> 
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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/20090107/e4e27f35/attachment.htm>


More information about the vtkusers mailing list