// python wrapper for vtkFocalPlanePointPlacer // #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 "vtkFocalPlanePointPlacer.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkFocalPlanePointPlacer(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkFocalPlanePointPlacer_ClassNew(); } #ifndef DECLARED_PyvtkPointPlacer_ClassNew extern "C" { PyObject *PyvtkPointPlacer_ClassNew(); } #define DECLARED_PyvtkPointPlacer_ClassNew #endif static const char *PyvtkFocalPlanePointPlacer_Doc = "vtkFocalPlanePointPlacer - no description provided.\n\n" "Superclass: vtkPointPlacer\n\n" "See Also:\n\n"; static PyObject * PyvtkFocalPlanePointPlacer_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkFocalPlanePointPlacer::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *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->vtkFocalPlanePointPlacer::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkFocalPlanePointPlacer *tempr = vtkFocalPlanePointPlacer::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkFocalPlanePointPlacer *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkFocalPlanePointPlacer::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 * PyvtkFocalPlanePointPlacer_ComputeWorldPosition_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeWorldPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); vtkRenderer *temp0 = nullptr; const int size1 = 2; double temp1[2]; double save1[2]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 9; double temp3[9]; double save3[9]; PyObject *result = nullptr; if (op && ap.CheckArgCount(4) && ap.GetVTKObject(temp0, "vtkRenderer") && 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); int tempr = (ap.IsBound() ? op->ComputeWorldPosition(temp0, temp1, temp2, temp3) : op->vtkFocalPlanePointPlacer::ComputeWorldPosition(temp0, temp1, temp2, temp3)); 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 * PyvtkFocalPlanePointPlacer_ComputeWorldPosition_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeWorldPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); vtkRenderer *temp0 = nullptr; const int size1 = 2; double temp1[2]; double save1[2]; const int size2 = 3; double temp2[3]; double save2[3]; const int size3 = 3; double temp3[3]; double save3[3]; const int size4 = 9; double temp4[9]; double save4[9]; PyObject *result = nullptr; if (op && ap.CheckArgCount(5) && ap.GetVTKObject(temp0, "vtkRenderer") && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3) && ap.GetArray(temp4, size4)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp4, save4, size4); int tempr = (ap.IsBound() ? op->ComputeWorldPosition(temp0, temp1, temp2, temp3, temp4) : op->vtkFocalPlanePointPlacer::ComputeWorldPosition(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(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 * PyvtkFocalPlanePointPlacer_ComputeWorldPosition(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 4: return PyvtkFocalPlanePointPlacer_ComputeWorldPosition_s1(self, args); case 5: return PyvtkFocalPlanePointPlacer_ComputeWorldPosition_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "ComputeWorldPosition"); return nullptr; } static PyObject * PyvtkFocalPlanePointPlacer_ValidateWorldPosition_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ValidateWorldPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *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->ValidateWorldPosition(temp0) : op->vtkFocalPlanePointPlacer::ValidateWorldPosition(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 * PyvtkFocalPlanePointPlacer_ValidateWorldPosition_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ValidateWorldPosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 9; double temp1[9]; double save1[9]; 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); int tempr = (ap.IsBound() ? op->ValidateWorldPosition(temp0, temp1) : op->vtkFocalPlanePointPlacer::ValidateWorldPosition(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.BuildValue(tempr); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_ValidateWorldPosition(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkFocalPlanePointPlacer_ValidateWorldPosition_s1(self, args); case 2: return PyvtkFocalPlanePointPlacer_ValidateWorldPosition_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "ValidateWorldPosition"); return nullptr; } static PyObject * PyvtkFocalPlanePointPlacer_SetOffset(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOffset"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetOffset(temp0); } else { op->vtkFocalPlanePointPlacer::SetOffset(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_GetOffset(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOffset"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetOffset() : op->vtkFocalPlanePointPlacer::GetOffset()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_SetPointBounds_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPointBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); double temp0; double temp1; double temp2; double temp3; double temp4; double temp5; PyObject *result = nullptr; if (op && ap.CheckArgCount(6) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2) && ap.GetValue(temp3) && ap.GetValue(temp4) && ap.GetValue(temp5)) { if (ap.IsBound()) { op->SetPointBounds(temp0, temp1, temp2, temp3, temp4, temp5); } else { op->vtkFocalPlanePointPlacer::SetPointBounds(temp0, temp1, temp2, temp3, temp4, temp5); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_SetPointBounds_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetPointBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); const int size0 = 6; double temp0[6]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { if (ap.IsBound()) { op->SetPointBounds(temp0); } else { op->vtkFocalPlanePointPlacer::SetPointBounds(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFocalPlanePointPlacer_SetPointBounds(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 6: return PyvtkFocalPlanePointPlacer_SetPointBounds_s1(self, args); case 1: return PyvtkFocalPlanePointPlacer_SetPointBounds_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetPointBounds"); return nullptr; } static PyObject * PyvtkFocalPlanePointPlacer_GetPointBounds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPointBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFocalPlanePointPlacer *op = static_cast(vp); int sizer = 6; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetPointBounds() : op->vtkFocalPlanePointPlacer::GetPointBounds()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyMethodDef PyvtkFocalPlanePointPlacer_Methods[] = { {"IsTypeOf", PyvtkFocalPlanePointPlacer_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nStandard methods for instances of this class.\n"}, {"IsA", PyvtkFocalPlanePointPlacer_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nStandard methods for instances of this class.\n"}, {"SafeDownCast", PyvtkFocalPlanePointPlacer_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkFocalPlanePointPlacer\nC++: static vtkFocalPlanePointPlacer *SafeDownCast(\n vtkObjectBase *o)\n\nStandard methods for instances of this class.\n"}, {"NewInstance", PyvtkFocalPlanePointPlacer_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkFocalPlanePointPlacer\nC++: vtkFocalPlanePointPlacer *NewInstance()\n\nStandard methods for instances of this class.\n"}, {"ComputeWorldPosition", PyvtkFocalPlanePointPlacer_ComputeWorldPosition, METH_VARARGS, "V.ComputeWorldPosition(vtkRenderer, [float, float], [float, float,\n float], [float, float, float, float, float, float, float,\n float, float]) -> int\nC++: int ComputeWorldPosition(vtkRenderer *ren,\n double displayPos[2], double worldPos[3],\n double worldOrient[9]) override;\nV.ComputeWorldPosition(vtkRenderer, [float, float], [float, float,\n float], [float, float, float], [float, float, float, float,\n float, float, float, float, float]) -> int\nC++: int ComputeWorldPosition(vtkRenderer *ren,\n double displayPos[2], double refWorldPos[3],\n double worldPos[3], double worldOrient[9]) override;\n\nGiven a renderer and a display position in pixel coordinates,\ncompute the world position and orientation where this point will\nbe placed. This method is typically used by the representation to\nplace the point initially. A return value of 1 indicates that\nconstraints of the placer are met.\n"}, {"ValidateWorldPosition", PyvtkFocalPlanePointPlacer_ValidateWorldPosition, METH_VARARGS, "V.ValidateWorldPosition([float, float, float]) -> int\nC++: int ValidateWorldPosition(double worldPos[3]) override;\nV.ValidateWorldPosition([float, float, float], [float, float,\n float, float, float, float, float, float, float]) -> int\nC++: int ValidateWorldPosition(double worldPos[3],\n double worldOrient[9]) override;\n\nValidate a world position. All world positions are valid so these\nmethods always return 1.\n"}, {"SetOffset", PyvtkFocalPlanePointPlacer_SetOffset, METH_VARARGS, "V.SetOffset(float)\nC++: virtual void SetOffset(double _arg)\n\nOptionally specify a signed offset from the focal plane for the\npoints to be placed at. If negative, the constraint plane is\noffset closer to the camera. If positive, its further away from\nthe camera.\n"}, {"GetOffset", PyvtkFocalPlanePointPlacer_GetOffset, METH_VARARGS, "V.GetOffset() -> float\nC++: virtual double GetOffset()\n\nOptionally specify a signed offset from the focal plane for the\npoints to be placed at. If negative, the constraint plane is\noffset closer to the camera. If positive, its further away from\nthe camera.\n"}, {"SetPointBounds", PyvtkFocalPlanePointPlacer_SetPointBounds, METH_VARARGS, "V.SetPointBounds(float, float, float, float, float, float)\nC++: void SetPointBounds(double, double, double, double, double,\n double)\nV.SetPointBounds((float, float, float, float, float, float))\nC++: void SetPointBounds(double a[6])\n\n"}, {"GetPointBounds", PyvtkFocalPlanePointPlacer_GetPointBounds, METH_VARARGS, "V.GetPointBounds() -> (float, float, float, float, float, float)\nC++: double *GetPointBounds()\n\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkFocalPlanePointPlacer_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkInteractionWidgetsPython.vtkFocalPlanePointPlacer", // 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 PyvtkFocalPlanePointPlacer_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 *PyvtkFocalPlanePointPlacer_StaticNew() { return vtkFocalPlanePointPlacer::New(); } PyObject *PyvtkFocalPlanePointPlacer_ClassNew() { PyVTKClass_Add( &PyvtkFocalPlanePointPlacer_Type, PyvtkFocalPlanePointPlacer_Methods, "vtkFocalPlanePointPlacer", &PyvtkFocalPlanePointPlacer_StaticNew); PyTypeObject *pytype = &PyvtkFocalPlanePointPlacer_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 *)PyvtkPointPlacer_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkFocalPlanePointPlacer( PyObject *dict) { PyObject *o; o = PyvtkFocalPlanePointPlacer_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkFocalPlanePointPlacer", o) != 0) { Py_DECREF(o); } }