[vtk-developers] Adding ComputeArea() to vtkTriangle
Bill Lorensen
bill.lorensen at gmail.com
Fri Dec 18 08:35:38 EST 2009
If you end up adding that, then you should probably do the same for vtkPolygon.
On Fri, Dec 18, 2009 at 8:05 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> Would there be any complaints if I add this function?
> // Description:
> // Compute the area of the triangle.
> double ComputeArea();
> //----------------------------------------------------------------------------
> double vtkTriangle::ComputeArea()
> {
> double p0[3];
> double p1[3];
> double p2[3];
> this->GetPoints()->GetPoint(0, p0);
> this->GetPoints()->GetPoint(1, p1);
> this->GetPoints()->GetPoint(2, p2);
> return vtkTriangle::TriangleArea(p0, p1, p2);
> }
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
More information about the vtk-developers
mailing list