// python wrapper for vtkTriangle // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkTriangle.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkTriangle(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkTriangle_ClassNew(); } #ifndef DECLARED_PyvtkCell_ClassNew extern "C" { PyObject *PyvtkCell_ClassNew(); } #define DECLARED_PyvtkCell_ClassNew #endif static const char *PyvtkTriangle_Doc = "vtkTriangle - a cell that represents a triangle\n\n" "Superclass: vtkCell\n\n" "vtkTriangle is a concrete implementation of vtkCell to represent a\n" "triangle located in 3-space.\n\n"; static PyObject * PyvtkTriangle_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkTriangle::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkTriangle::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkTriangle *tempr = vtkTriangle::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTriangle_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkTriangle *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkTriangle::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkTriangle_GetEdge(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEdge"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkCell *tempr = (ap.IsBound() ? op->GetEdge(temp0) : op->vtkTriangle::GetEdge(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTriangle_GetCellType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetCellType() : op->vtkTriangle::GetCellType()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetCellDimension(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellDimension"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetCellDimension() : op->vtkTriangle::GetCellDimension()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetNumberOfEdges(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfEdges"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetNumberOfEdges() : op->vtkTriangle::GetNumberOfEdges()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetNumberOfFaces(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfFaces"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetNumberOfFaces() : op->vtkTriangle::GetNumberOfFaces()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetFace(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFace"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkCell *tempr = (ap.IsBound() ? op->GetFace(temp0) : op->vtkTriangle::GetFace(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkTriangle_CellBoundary(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CellBoundary"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; vtkIdList *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetVTKObject(temp2, "vtkIdList")) { ap.SaveArray(temp1, save1, size1); int tempr = (ap.IsBound() ? op->CellBoundary(temp0, temp1, temp2) : op->vtkTriangle::CellBoundary(temp0, temp1, temp2)); if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_Contour(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Contour"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); double temp0; vtkDataArray *temp1 = nullptr; vtkIncrementalPointLocator *temp2 = nullptr; vtkCellArray *temp3 = nullptr; vtkCellArray *temp4 = nullptr; vtkCellArray *temp5 = nullptr; vtkPointData *temp6 = nullptr; vtkPointData *temp7 = nullptr; vtkCellData *temp8 = nullptr; vtkIdType temp9; vtkCellData *temp10 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(11) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkDataArray") && ap.GetVTKObject(temp2, "vtkIncrementalPointLocator") && ap.GetVTKObject(temp3, "vtkCellArray") && ap.GetVTKObject(temp4, "vtkCellArray") && ap.GetVTKObject(temp5, "vtkCellArray") && ap.GetVTKObject(temp6, "vtkPointData") && ap.GetVTKObject(temp7, "vtkPointData") && ap.GetVTKObject(temp8, "vtkCellData") && ap.GetValue(temp9) && ap.GetVTKObject(temp10, "vtkCellData")) { if (ap.IsBound()) { op->Contour(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10); } else { op->vtkTriangle::Contour(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_EvaluatePosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EvaluatePosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); int temp2; const int size3 = 3; double temp3[3]; double save3[3]; double temp4; int size5 = ap.GetArgSize(5); vtkPythonArgs::Array store5(2*size5); double *temp5 = store5.Data(); double *save5 = (size5 == 0 ? nullptr : temp5 + size5); PyObject *result = nullptr; if (op && ap.CheckArgCount(6) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetValue(temp2) && ap.GetArray(temp3, size3) && ap.GetValue(temp4) && ap.GetArray(temp5, size5)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp5, save5, size5); int tempr = (ap.IsBound() ? op->EvaluatePosition(temp0, temp1, temp2, temp3, temp4, temp5) : op->vtkTriangle::EvaluatePosition(temp0, temp1, temp2, temp3, temp4, temp5)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { ap.SetArgValue(2, temp2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { ap.SetArgValue(4, temp4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_EvaluateLocation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EvaluateLocation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; int size3 = ap.GetArgSize(3); vtkPythonArgs::Array store3(2*size3); double *temp3 = store3.Data(); double *save3 = (size3 == 0 ? nullptr : temp3 + size3); PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); if (ap.IsBound()) { op->EvaluateLocation(temp0, temp1, temp2, temp3); } else { op->vtkTriangle::EvaluateLocation(temp0, temp1, temp2, temp3); } if (!ap.ErrorOccurred()) { ap.SetArgValue(0, temp0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_Triangulate(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Triangulate"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; vtkIdList *temp1 = nullptr; vtkPoints *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkIdList") && ap.GetVTKObject(temp2, "vtkPoints")) { int tempr = (ap.IsBound() ? op->Triangulate(temp0, temp1, temp2) : op->vtkTriangle::Triangulate(temp0, temp1, temp2)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_Derivatives(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Derivatives"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; int size2 = ap.GetArgSize(2); vtkPythonArgs::Array store2(2*size2); double *temp2 = store2.Data(); double *save2 = (size2 == 0 ? nullptr : temp2 + size2); int temp3; int size4 = ap.GetArgSize(4); vtkPythonArgs::Array store4(2*size4); double *temp4 = store4.Data(); double *save4 = (size4 == 0 ? nullptr : temp4 + size4); PyObject *result = nullptr; if (op && ap.CheckArgCount(5) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetValue(temp3) && ap.GetArray(temp4, size4)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp4, save4, size4); if (ap.IsBound()) { op->Derivatives(temp0, temp1, temp2, temp3, temp4); } else { op->vtkTriangle::Derivatives(temp0, temp1, temp2, temp3, temp4); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_GetParametricCoords(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricCoords"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetParametricCoords() : op->vtkTriangle::GetParametricCoords()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_ComputeArea(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeArea"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->ComputeArea() : op->vtkTriangle::ComputeArea()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_Clip(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Clip"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); double temp0; vtkDataArray *temp1 = nullptr; vtkIncrementalPointLocator *temp2 = nullptr; vtkCellArray *temp3 = nullptr; vtkPointData *temp4 = nullptr; vtkPointData *temp5 = nullptr; vtkCellData *temp6 = nullptr; vtkIdType temp7; vtkCellData *temp8 = nullptr; int temp9; PyObject *result = nullptr; if (op && ap.CheckArgCount(10) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkDataArray") && ap.GetVTKObject(temp2, "vtkIncrementalPointLocator") && ap.GetVTKObject(temp3, "vtkCellArray") && ap.GetVTKObject(temp4, "vtkPointData") && ap.GetVTKObject(temp5, "vtkPointData") && ap.GetVTKObject(temp6, "vtkCellData") && ap.GetValue(temp7) && ap.GetVTKObject(temp8, "vtkCellData") && ap.GetValue(temp9)) { if (ap.IsBound()) { op->Clip(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9); } else { op->vtkTriangle::Clip(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_InterpolationFunctions(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "InterpolationFunctions"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; PyObject *result = nullptr; if (ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); vtkTriangle::InterpolationFunctions(temp0, temp1); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_InterpolationDerivs(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "InterpolationDerivs"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 6; double temp1[6]; double save1[6]; PyObject *result = nullptr; if (ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); vtkTriangle::InterpolationDerivs(temp0, temp1); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_InterpolateFunctions(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateFunctions"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->InterpolateFunctions(temp0, temp1); } else { op->vtkTriangle::InterpolateFunctions(temp0, temp1); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_InterpolateDerivs(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateDerivs"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 6; double temp1[6]; double save1[6]; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->InterpolateDerivs(temp0, temp1); } else { op->vtkTriangle::InterpolateDerivs(temp0, temp1); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_GetEdgeArray(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEdgeArray"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int *tempr = (ap.IsBound() ? op->GetEdgeArray(temp0) : op->vtkTriangle::GetEdgeArray(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_IntersectWithLine(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IntersectWithLine"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; double temp2; double temp3; const int size4 = 3; double temp4[3]; double save4[3]; const int size5 = 3; double temp5[3]; double save5[3]; int temp6; PyObject *result = nullptr; if (op && ap.CheckArgCount(7) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetValue(temp2) && ap.GetValue(temp3) && ap.GetArray(temp4, size4) && ap.GetArray(temp5, size5) && ap.GetValue(temp6)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp4, save4, size4); ap.SaveArray(temp5, save5, size5); int tempr = (ap.IsBound() ? op->IntersectWithLine(temp0, temp1, temp2, temp3, temp4, temp5, temp6) : op->vtkTriangle::IntersectWithLine(temp0, temp1, temp2, temp3, temp4, temp5, temp6)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { ap.SetArgValue(3, temp3); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { ap.SetArgValue(6, temp6); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetParametricCenter(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricCenter"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); int tempr = (ap.IsBound() ? op->GetParametricCenter(temp0) : op->vtkTriangle::GetParametricCenter(temp0)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_GetParametricDistance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricDistance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkTriangle *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); double tempr = (ap.IsBound() ? op->GetParametricDistance(temp0) : op->vtkTriangle::GetParametricDistance(temp0)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_TriangleCenter(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "TriangleCenter"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); vtkTriangle::TriangleCenter(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_TriangleArea(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "TriangleArea"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; PyObject *result = nullptr; if (ap.CheckArgCount(3) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); double tempr = vtkTriangle::TriangleArea(temp0, temp1, temp2); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_Circumcircle(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "Circumcircle"); const int size0 = 2; double temp0[2]; double save0[2]; const int size1 = 2; double temp1[2]; double save1[2]; const int size2 = 2; double temp2[2]; double save2[2]; const int size3 = 2; double temp3[2]; double save3[2]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); double tempr = vtkTriangle::Circumcircle(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_BarycentricCoords(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "BarycentricCoords"); const int size0 = 2; double temp0[2]; double save0[2]; const int size1 = 2; double temp1[2]; double save1[2]; const int size2 = 2; double temp2[2]; double save2[2]; const int size3 = 2; double temp3[2]; double save3[2]; const int size4 = 3; double temp4[3]; double save4[3]; PyObject *result = nullptr; if (ap.CheckArgCount(5) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3) && ap.GetArray(temp4, size4)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp4, save4, size4); int tempr = vtkTriangle::BarycentricCoords(temp0, temp1, temp2, temp3, temp4); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_ProjectTo2D(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ProjectTo2D"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 2; double temp3[2]; double save3[2]; const int size4 = 2; double temp4[2]; double save4[2]; const int size5 = 2; double temp5[2]; double save5[2]; PyObject *result = nullptr; if (ap.CheckArgCount(6) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3) && ap.GetArray(temp4, size4) && ap.GetArray(temp5, size5)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp4, save4, size4); ap.SaveArray(temp5, save5, size5); int tempr = vtkTriangle::ProjectTo2D(temp0, temp1, temp2, temp3, temp4, temp5); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_ComputeNormal_s1(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ComputeNormal"); vtkPoints *temp0 = nullptr; int temp1; int size2 = ap.GetArgSize(2); vtkPythonArgs::Array store2(2*size2); vtkIdType *temp2 = store2.Data(); vtkIdType *save2 = (size2 == 0 ? nullptr : temp2 + size2); const int size3 = 3; double temp3[3]; double save3[3]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetVTKObject(temp0, "vtkPoints") && ap.GetValue(temp1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); vtkTriangle::ComputeNormal(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_ComputeNormal_s2(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ComputeNormal"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); vtkTriangle::ComputeNormal(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkTriangle_ComputeNormal_Methods[] = { {nullptr, PyvtkTriangle_ComputeNormal_s1, METH_VARARGS | METH_STATIC, "ViPP *vtkPoints *k *d"}, {nullptr, PyvtkTriangle_ComputeNormal_s2, METH_VARARGS | METH_STATIC, "PPPP *d *d *d *d"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkTriangle_ComputeNormal(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkTriangle_ComputeNormal_Methods; int nargs = vtkPythonArgs::GetArgCount(args); switch(nargs) { case 4: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "ComputeNormal"); return nullptr; } static PyObject * PyvtkTriangle_ComputeNormalDirection(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ComputeNormalDirection"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); vtkTriangle::ComputeNormalDirection(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_TrianglesIntersect(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "TrianglesIntersect"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; const int size4 = 3; double temp4[3]; double save4[3]; const int size5 = 3; double temp5[3]; double save5[3]; PyObject *result = nullptr; if (ap.CheckArgCount(6) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3) && ap.GetArray(temp4, size4) && ap.GetArray(temp5, size5)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp4, save4, size4); ap.SaveArray(temp5, save5, size5); int tempr = vtkTriangle::TrianglesIntersect(temp0, temp1, temp2, temp3, temp4, temp5); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_PointInTriangle(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "PointInTriangle"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; double temp4; PyObject *result = nullptr; if (ap.CheckArgCount(5) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3) && ap.GetValue(temp4)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); int tempr = vtkTriangle::PointInTriangle(temp0, temp1, temp2, temp3, temp4); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkTriangle_ComputeQuadric_s1(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ComputeQuadric"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; static int size3[2] = { 4, 4 }; double temp3[4][4]; double save3[4][4]; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetNArray(*temp3, 2, size3)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(*temp3, *save3, size3[0]*size3[1]); vtkTriangle::ComputeQuadric(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(*temp3, *save3, size3[0]*size3[1]) && !ap.ErrorOccurred()) { ap.SetNArray(3, *temp3, 2, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkTriangle_ComputeQuadric_s2(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ComputeQuadric"); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; vtkQuadric *temp3 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(4) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetVTKObject(temp3, "vtkQuadric")) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); vtkTriangle::ComputeQuadric(temp0, temp1, temp2, temp3); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkTriangle_ComputeQuadric_Methods[] = { {nullptr, PyvtkTriangle_ComputeQuadric_s1, METH_VARARGS | METH_STATIC, "PPPA *d *d *d *d[4]"}, {nullptr, PyvtkTriangle_ComputeQuadric_s2, METH_VARARGS | METH_STATIC, "PPPV *d *d *d *vtkQuadric"}, {nullptr, nullptr, 0, nullptr} }; static PyObject * PyvtkTriangle_ComputeQuadric(PyObject *self, PyObject *args) { PyMethodDef *methods = PyvtkTriangle_ComputeQuadric_Methods; int nargs = vtkPythonArgs::GetArgCount(args); switch(nargs) { case 4: return vtkPythonOverload::CallMethod(methods, self, args); } vtkPythonArgs::ArgCountError(nargs, "ComputeQuadric"); return nullptr; } static PyMethodDef PyvtkTriangle_Methods[] = { {"IsTypeOf", PyvtkTriangle_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkTriangle_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkTriangle_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkTriangle\nC++: static vtkTriangle *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkTriangle_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkTriangle\nC++: vtkTriangle *NewInstance()\n\n"}, {"GetEdge", PyvtkTriangle_GetEdge, METH_VARARGS, "V.GetEdge(int) -> vtkCell\nC++: vtkCell *GetEdge(int edgeId) override;\n\nGet the edge specified by edgeId (range 0 to 2) and return that\nedge's coordinates.\n"}, {"GetCellType", PyvtkTriangle_GetCellType, METH_VARARGS, "V.GetCellType() -> int\nC++: int GetCellType() override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"GetCellDimension", PyvtkTriangle_GetCellDimension, METH_VARARGS, "V.GetCellDimension() -> int\nC++: int GetCellDimension() override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"GetNumberOfEdges", PyvtkTriangle_GetNumberOfEdges, METH_VARARGS, "V.GetNumberOfEdges() -> int\nC++: int GetNumberOfEdges() override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"GetNumberOfFaces", PyvtkTriangle_GetNumberOfFaces, METH_VARARGS, "V.GetNumberOfFaces() -> int\nC++: int GetNumberOfFaces() override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"GetFace", PyvtkTriangle_GetFace, METH_VARARGS, "V.GetFace(int) -> vtkCell\nC++: vtkCell *GetFace(int) override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"CellBoundary", PyvtkTriangle_CellBoundary, METH_VARARGS, "V.CellBoundary(int, [float, float, float], vtkIdList) -> int\nC++: int CellBoundary(int subId, double pcoords[3],\n vtkIdList *pts) override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"Contour", PyvtkTriangle_Contour, METH_VARARGS, "V.Contour(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkCellArray, vtkCellArray, vtkPointData,\n vtkPointData, vtkCellData, int, vtkCellData)\nC++: void Contour(double value, vtkDataArray *cellScalars,\n vtkIncrementalPointLocator *locator, vtkCellArray *verts,\n vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd,\n vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId,\n vtkCellData *outCd) override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"EvaluatePosition", PyvtkTriangle_EvaluatePosition, METH_VARARGS, "V.EvaluatePosition([float, float, float], [float, ...], int,\n [float, float, float], float, [float, ...]) -> int\nC++: int EvaluatePosition(double x[3], double *closestPoint,\n int &subId, double pcoords[3], double &dist2, double *weights)\n override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"EvaluateLocation", PyvtkTriangle_EvaluateLocation, METH_VARARGS, "V.EvaluateLocation(int, [float, float, float], [float, float,\n float], [float, ...])\nC++: void EvaluateLocation(int &subId, double pcoords[3],\n double x[3], double *weights) override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"Triangulate", PyvtkTriangle_Triangulate, METH_VARARGS, "V.Triangulate(int, vtkIdList, vtkPoints) -> int\nC++: int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)\n override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"Derivatives", PyvtkTriangle_Derivatives, METH_VARARGS, "V.Derivatives(int, [float, float, float], [float, ...], int,\n [float, ...])\nC++: void Derivatives(int subId, double pcoords[3],\n double *values, int dim, double *derivs) override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"GetParametricCoords", PyvtkTriangle_GetParametricCoords, METH_VARARGS, "V.GetParametricCoords() -> (float, ...)\nC++: double *GetParametricCoords() override;\n\nSee the vtkCell API for descriptions of these methods.\n"}, {"ComputeArea", PyvtkTriangle_ComputeArea, METH_VARARGS, "V.ComputeArea() -> float\nC++: double ComputeArea()\n\nA convenience function to compute the area of a vtkTriangle.\n"}, {"Clip", PyvtkTriangle_Clip, METH_VARARGS, "V.Clip(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkPointData, vtkPointData, vtkCellData, int,\n vtkCellData, int)\nC++: void Clip(double value, vtkDataArray *cellScalars,\n vtkIncrementalPointLocator *locator, vtkCellArray *polys,\n vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd,\n vtkIdType cellId, vtkCellData *outCd, int insideOut) override;\n\nClip this triangle using scalar value provided. Like contouring,\nexcept that it cuts the triangle to produce other triangles.\n"}, {"InterpolationFunctions", PyvtkTriangle_InterpolationFunctions, METH_VARARGS, "V.InterpolationFunctions([float, float, float], [float, float,\n float])\nC++: static void InterpolationFunctions(double pcoords[3],\n double sf[3])\n\n@deprecated Replaced by vtkTriangle::InterpolateFunctions as of\nVTK 5.2\n"}, {"InterpolationDerivs", PyvtkTriangle_InterpolationDerivs, METH_VARARGS, "V.InterpolationDerivs([float, float, float], [float, float, float,\n float, float, float])\nC++: static void InterpolationDerivs(double pcoords[3],\n double derivs[6])\n\n@deprecated Replaced by vtkTriangle::InterpolateDerivs as of VTK\n5.2\n"}, {"InterpolateFunctions", PyvtkTriangle_InterpolateFunctions, METH_VARARGS, "V.InterpolateFunctions([float, float, float], [float, float,\n float])\nC++: void InterpolateFunctions(double pcoords[3], double sf[3])\n override;\n\nCompute the interpolation functions/derivatives (aka shape\nfunctions/derivatives)\n"}, {"InterpolateDerivs", PyvtkTriangle_InterpolateDerivs, METH_VARARGS, "V.InterpolateDerivs([float, float, float], [float, float, float,\n float, float, float])\nC++: void InterpolateDerivs(double pcoords[3], double derivs[6])\n override;\n\nCompute the interpolation functions/derivatives (aka shape\nfunctions/derivatives)\n"}, {"GetEdgeArray", PyvtkTriangle_GetEdgeArray, METH_VARARGS, "V.GetEdgeArray(int) -> (int, ...)\nC++: int *GetEdgeArray(int edgeId)\n\nReturn the ids of the vertices defining edge (`edgeId`). Ids are\nrelated to the cell, not to the dataset.\n"}, {"IntersectWithLine", PyvtkTriangle_IntersectWithLine, METH_VARARGS, "V.IntersectWithLine([float, float, float], [float, float, float],\n float, float, [float, float, float], [float, float, float],\n int) -> int\nC++: int IntersectWithLine(double p1[3], double p2[3], double tol,\n double &t, double x[3], double pcoords[3], int &subId)\n override;\n\nPlane intersection plus in/out test on triangle. The in/out test\nis performed using tol as the tolerance.\n"}, {"GetParametricCenter", PyvtkTriangle_GetParametricCenter, METH_VARARGS, "V.GetParametricCenter([float, float, float]) -> int\nC++: int GetParametricCenter(double pcoords[3]) override;\n\nReturn the center of the triangle in parametric coordinates.\n"}, {"GetParametricDistance", PyvtkTriangle_GetParametricDistance, METH_VARARGS, "V.GetParametricDistance([float, float, float]) -> float\nC++: double GetParametricDistance(double pcoords[3]) override;\n\nReturn the distance of the parametric coordinate provided to the\ncell. If inside the cell, a distance of zero is returned.\n"}, {"TriangleCenter", PyvtkTriangle_TriangleCenter, METH_VARARGS, "V.TriangleCenter([float, float, float], [float, float, float],\n [float, float, float], [float, float, float])\nC++: static void TriangleCenter(double p1[3], double p2[3],\n double p3[3], double center[3])\n\nCompute the center of the triangle.\n"}, {"TriangleArea", PyvtkTriangle_TriangleArea, METH_VARARGS, "V.TriangleArea([float, float, float], [float, float, float],\n [float, float, float]) -> float\nC++: static double TriangleArea(double p1[3], double p2[3],\n double p3[3])\n\nCompute the area of a triangle in 3D. See also\nvtkTriangle::ComputeArea()\n"}, {"Circumcircle", PyvtkTriangle_Circumcircle, METH_VARARGS, "V.Circumcircle([float, float], [float, float], [float, float],\n [float, float]) -> float\nC++: static double Circumcircle(double p1[2], double p2[2],\n double p3[2], double center[2])\n\nCompute the circumcenter (center[3]) and radius squared (method\nreturn value) of a triangle defined by the three points x1, x2,\nand x3. (Note that the coordinates are 2D. 3D points can be used\nbut the z-component will be ignored.)\n"}, {"BarycentricCoords", PyvtkTriangle_BarycentricCoords, METH_VARARGS, "V.BarycentricCoords([float, float], [float, float], [float,\n float], [float, float], [float, float, float]) -> int\nC++: static int BarycentricCoords(double x[2], double x1[2],\n double x2[2], double x3[2], double bcoords[3])\n\nGiven a 2D point x[2], determine the barycentric coordinates of\nthe point. Barycentric coordinates are a natural coordinate\nsystem for simplices that express a position as a linear\ncombination of the vertices. For a triangle, there are three\nbarycentric coordinates (because there are three vertices), and\nthe sum of the coordinates must equal 1. If a point x is inside a\nsimplex, then all three coordinates will be strictly positive. \nIf two coordinates are zero (so the third =1), then the point x\nis on a vertex. If one coordinates are zero, the point x is on an\nedge. In this method, you must specify the vertex coordinates\nx1->x3. Returns 0 if triangle is degenerate.\n"}, {"ProjectTo2D", PyvtkTriangle_ProjectTo2D, METH_VARARGS, "V.ProjectTo2D([float, float, float], [float, float, float],\n [float, float, float], [float, float], [float, float], [float,\n float]) -> int\nC++: static int ProjectTo2D(double x1[3], double x2[3],\n double x3[3], double v1[2], double v2[2], double v3[2])\n\nProject triangle defined in 3D to 2D coordinates. Returns 0 if\ndegenerate triangle; non-zero value otherwise. Input points are\nx1->x3; output 2D points are v1->v3.\n"}, {"ComputeNormal", PyvtkTriangle_ComputeNormal, METH_VARARGS, "V.ComputeNormal(vtkPoints, int, [int, ...], [float, float, float])\nC++: static void ComputeNormal(vtkPoints *p, int numPts,\n vtkIdType *pts, double n[3])\nV.ComputeNormal([float, float, float], [float, float, float],\n [float, float, float], [float, float, float])\nC++: static void ComputeNormal(double v1[3], double v2[3],\n double v3[3], double n[3])\n\nCompute the triangle normal from a points list, and a list of\npoint ids that index into the points list.\n"}, {"ComputeNormalDirection", PyvtkTriangle_ComputeNormalDirection, METH_VARARGS, "V.ComputeNormalDirection([float, float, float], [float, float,\n float], [float, float, float], [float, float, float])\nC++: static void ComputeNormalDirection(double v1[3],\n double v2[3], double v3[3], double n[3])\n\nCompute the (unnormalized) triangle normal direction from three\npoints.\n"}, {"TrianglesIntersect", PyvtkTriangle_TrianglesIntersect, METH_VARARGS, "V.TrianglesIntersect([float, float, float], [float, float, float],\n [float, float, float], [float, float, float], [float, float,\n float], [float, float, float]) -> int\nC++: static int TrianglesIntersect(double p1[3], double q1[3],\n double r1[3], double p2[3], double q2[3], double r2[3])\n\nDetermine whether or not triangle (p1,q1,r1) intersects triangle\n(p2,q2,r2). This method is adapted from Olivier Devillers,\nPhilippe Guigue. Faster Triangle-Triangle Intersection Tests.\nRR-4488, IN-RIA. 2002. .\n"}, {"PointInTriangle", PyvtkTriangle_PointInTriangle, METH_VARARGS, "V.PointInTriangle([float, float, float], [float, float, float],\n [float, float, float], [float, float, float], float) -> int\nC++: static int PointInTriangle(double x[3], double x1[3],\n double x2[3], double x3[3], double tol2)\n\nGiven a point x, determine whether it is inside (within the\ntolerance squared, tol2) the triangle defined by the three\ncoordinate values p1, p2, p3. Method is via comparing dot\nproducts. (Note: in current implementation the tolerance only\nworks in the neighborhood of the three vertices of the triangle.\n"}, {"ComputeQuadric", PyvtkTriangle_ComputeQuadric, METH_VARARGS, "V.ComputeQuadric([float, float, float], [float, float, float],\n [float, float, float], [[float, float, float, float], [float,\n float, float, float], [float, float, float, float], [float,\n float, float, float]])\nC++: static void ComputeQuadric(double x1[3], double x2[3],\n double x3[3], double quadric[4][4])\nV.ComputeQuadric([float, float, float], [float, float, float],\n [float, float, float], vtkQuadric)\nC++: static void ComputeQuadric(double x1[3], double x2[3],\n double x3[3], vtkQuadric *quadric)\n\nCalculate the error quadric for this triangle. Return the\nquadric as a 4x4 matrix or a vtkQuadric. (from Peter Lindstrom's\nSiggraph 2000 paper, \"Out-of-Core Simplification of Large\nPolygonal Models\")\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkTriangle_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonDataModelPython.vtkTriangle", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkTriangle_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkTriangle_StaticNew() { return vtkTriangle::New(); } PyObject *PyvtkTriangle_ClassNew() { PyVTKClass_Add( &PyvtkTriangle_Type, PyvtkTriangle_Methods, "vtkTriangle", &PyvtkTriangle_StaticNew); PyTypeObject *pytype = &PyvtkTriangle_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkCell_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkTriangle( PyObject *dict) { PyObject *o; o = PyvtkTriangle_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkTriangle", o) != 0) { Py_DECREF(o); } }