[vtkusers] How to pass a triangle without its point set?
Bill Lorensen
bill.lorensen at gmail.com
Sun Nov 1 08:08:25 EST 2009
David,
I'll take a look.
Bill
On Sat, Oct 31, 2009 at 8:27 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Sat, Oct 24, 2009 at 12:47 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> vtkTriangle is a vtkCell. It only has 3 points and 3 point ids. The
>> points and ids are created as construction. In your original example,
>> how would expect triangle to know about the points you created.
>>
>> SetPoint and InsertPoint have different semantics. In this case,
>> SetPoint is better, since range checking is not required.
>>
>> From the vtkPoints.h
>> // Description:
>> // Insert point into object. No range checking performed (fast!).
>> // Make sure you use SetNumberOfPoints() to allocate memory prior
>> // to using SetPoint().
>> void SetPoint(vtkIdType id, const float x[3]) { this->Data->SetTuple(id,x);};
>> void SetPoint(vtkIdType id, const double x[3]) { this->Data->SetTuple(id,x);};
>> void SetPoint(vtkIdType id, double x, double y, double z);
>>
>> // Description:
>> // Insert point into object. Range checking performed and memory
>> // allocated as necessary.
>> void InsertPoint(vtkIdType id, const float x[3])
>> { this->Data->InsertTuple(id,x);};
>> void InsertPoint(vtkIdType id, const double x[3])
>> {this->Data->InsertTuple(id,x);};
>> void InsertPoint(vtkIdType id, double x, double y, double z);
>>
>> vtkPolyData has a large array of points that can be indexed.
>> vtkTriangle is about working with an individual to do things like
>> compute areas, normals, etc.
>>
>> Bill
>
>
> Bill,
>
> Would you mind reading the text at the top of these and making sure it
> is clear/correct?
>
> http://www.vtk.org/Wiki/Triangle_%28on_large_point_array%29
> http://www.vtk.org/Wiki/Triangle_%28self_contained%29
>
> Thanks,
>
> David
> _______________________________________________
> 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