[vtkusers] Generate triangulation from vertex and index info

Hugo Valdebenito hugo at maptek.cl
Wed Oct 6 10:21:53 EDT 2010


What means triangle2p0id?


2010/9/30 David Doria <daviddoria at gmail.com>

> On Thu, Sep 30, 2010 at 10:13 AM, Hugo Valdebenito <hugo at maptek.cl> wrote:
>
>>
>> Hi all
>>
>> With the delaunay2D (3D) schema, the distribution of triangles is not the
>> same, depending of the input points order. If I already have the vetex and
>> index definitions for the triangles, how can I make the triangulation?
>>
>> Hugo
>>
>
> If you already know the connectivity of the points, you can use this:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Triangle
>
> To add the next triangle, do
>
>   vtkSmartPointer<vtkTriangle> triangle2 =
>     vtkSmartPointer<vtkTriangle>::New();
>   triangle2->GetPointIds()->SetId ( 0, triangle2p0id );
>   triangle2->GetPointIds()->SetId ( 1, triangle2p1id );
>   triangle2->GetPointIds()->SetId ( 2, triangle2p2id );
> <http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Triangle> triangles->InsertNextCell
> ( triangle2 );
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101006/05b34e1d/attachment.htm>


More information about the vtkusers mailing list