// python wrapper for vtkGeoSphereTransform // #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 "vtkGeoSphereTransform.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkGeoSphereTransform(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkGeoSphereTransform_ClassNew(); } #ifndef DECLARED_PyvtkAbstractTransform_ClassNew extern "C" { PyObject *PyvtkAbstractTransform_ClassNew(); } #define DECLARED_PyvtkAbstractTransform_ClassNew #endif static const char *PyvtkGeoSphereTransform_Doc = "vtkGeoSphereTransform - A transformation between long-lat-alt and\nrect coords\n\n" "Superclass: vtkAbstractTransform\n\n" "the cartesian coordinate system is the following (if BaseAltitude is\n" "0),\n" "- the origin is at the center of the earth\n" "- the x axis goes from the origin to (longtitude=-90,latitude=0),\n" " intersection of equator and the meridian passing just east of\n" " Galapagos Islands\n" "- the y axis goes from the origin to the intersection of Greenwitch\n" " meridian and equator (longitude=0,latitude=0)\n" "- the z axis goes from the origin to the Geographic North Pole\n" " (latitude=90)\n" "- therefore the frame is right-handed.\n\n"; static PyObject * PyvtkGeoSphereTransform_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkGeoSphereTransform::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoSphereTransform_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *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->vtkGeoSphereTransform::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoSphereTransform_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkGeoSphereTransform *tempr = vtkGeoSphereTransform::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoSphereTransform_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoSphereTransform *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkGeoSphereTransform::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 * PyvtkGeoSphereTransform_Inverse(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Inverse"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Inverse(); } else { op->vtkGeoSphereTransform::Inverse(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_InternalTransformPoint(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InternalTransformPoint"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); const int size0 = 3; double temp0[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(temp1, save1, size1); if (ap.IsBound()) { op->InternalTransformPoint(temp0, temp1); } else { op->vtkGeoSphereTransform::InternalTransformPoint(temp0, temp1); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_InternalTransformDerivative(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InternalTransformDerivative"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); const int size0 = 3; double temp0[3]; const int size1 = 3; double temp1[3]; double save1[3]; static int size2[2] = { 3, 3 }; double temp2[3][3]; double save2[3][3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetNArray(*temp2, 2, size2)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(*temp2, *save2, size2[0]*size2[1]); if (ap.IsBound()) { op->InternalTransformDerivative(temp0, temp1, temp2); } else { op->vtkGeoSphereTransform::InternalTransformDerivative(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(*temp2, *save2, size2[0]*size2[1]) && !ap.ErrorOccurred()) { ap.SetNArray(2, *temp2, 2, size2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_MakeTransform(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "MakeTransform"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkAbstractTransform *tempr = (ap.IsBound() ? op->MakeTransform() : op->vtkGeoSphereTransform::MakeTransform()); 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 * PyvtkGeoSphereTransform_SetToRectangular(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetToRectangular"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); bool temp0 = false; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetToRectangular(temp0); } else { op->vtkGeoSphereTransform::SetToRectangular(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_GetToRectangular(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetToRectangular"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { bool tempr = (ap.IsBound() ? op->GetToRectangular() : op->vtkGeoSphereTransform::GetToRectangular()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoSphereTransform_ToRectangularOn(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToRectangularOn"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ToRectangularOn(); } else { op->vtkGeoSphereTransform::ToRectangularOn(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_ToRectangularOff(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToRectangularOff"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ToRectangularOff(); } else { op->vtkGeoSphereTransform::ToRectangularOff(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_SetBaseAltitude(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetBaseAltitude"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetBaseAltitude(temp0); } else { op->vtkGeoSphereTransform::SetBaseAltitude(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoSphereTransform_GetBaseAltitude(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBaseAltitude"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoSphereTransform *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetBaseAltitude() : op->vtkGeoSphereTransform::GetBaseAltitude()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkGeoSphereTransform_Methods[] = { {"IsTypeOf", PyvtkGeoSphereTransform_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", PyvtkGeoSphereTransform_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", PyvtkGeoSphereTransform_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkGeoSphereTransform\nC++: static vtkGeoSphereTransform *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkGeoSphereTransform_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkGeoSphereTransform\nC++: vtkGeoSphereTransform *NewInstance()\n\n"}, {"Inverse", PyvtkGeoSphereTransform_Inverse, METH_VARARGS, "V.Inverse()\nC++: void Inverse() override;\n\nInvert the transformation.\n"}, {"InternalTransformPoint", PyvtkGeoSphereTransform_InternalTransformPoint, METH_VARARGS, "V.InternalTransformPoint((float, float, float), [float, float,\n float])\nC++: void InternalTransformPoint(const double in[3],\n double out[3]) override;\n\nThis will calculate the transformation without calling Update.\nMeant for use only within other VTK classes.\n"}, {"InternalTransformDerivative", PyvtkGeoSphereTransform_InternalTransformDerivative, METH_VARARGS, "V.InternalTransformDerivative((float, float, float), [float,\n float, float], [[float, float, float], [float, float, float],\n [float, float, float]])\nC++: void InternalTransformDerivative(const double in[3],\n double out[3], double derivative[3][3]) override;\n\nThis will transform a point and, at the same time, calculate a\n3x3 Jacobian matrix that provides the partial derivatives of the\ntransformation at that point. This method does not call Update.\nMeant for use only within other VTK classes.\n"}, {"MakeTransform", PyvtkGeoSphereTransform_MakeTransform, METH_VARARGS, "V.MakeTransform() -> vtkAbstractTransform\nC++: vtkAbstractTransform *MakeTransform() override;\n\nMake another transform of the same type.\n"}, {"SetToRectangular", PyvtkGeoSphereTransform_SetToRectangular, METH_VARARGS, "V.SetToRectangular(bool)\nC++: virtual void SetToRectangular(bool _arg)\n\nIf on, this transform converts (long,lat,alt) triples to (x,y,z)\nas an offset from the center of the earth. Alt, x, y, and z are\nall be in meters. If off, the transform works in the reverse\ndirection. Initial value is on.\n"}, {"GetToRectangular", PyvtkGeoSphereTransform_GetToRectangular, METH_VARARGS, "V.GetToRectangular() -> bool\nC++: virtual bool GetToRectangular()\n\nIf on, this transform converts (long,lat,alt) triples to (x,y,z)\nas an offset from the center of the earth. Alt, x, y, and z are\nall be in meters. If off, the transform works in the reverse\ndirection. Initial value is on.\n"}, {"ToRectangularOn", PyvtkGeoSphereTransform_ToRectangularOn, METH_VARARGS, "V.ToRectangularOn()\nC++: virtual void ToRectangularOn()\n\nIf on, this transform converts (long,lat,alt) triples to (x,y,z)\nas an offset from the center of the earth. Alt, x, y, and z are\nall be in meters. If off, the transform works in the reverse\ndirection. Initial value is on.\n"}, {"ToRectangularOff", PyvtkGeoSphereTransform_ToRectangularOff, METH_VARARGS, "V.ToRectangularOff()\nC++: virtual void ToRectangularOff()\n\nIf on, this transform converts (long,lat,alt) triples to (x,y,z)\nas an offset from the center of the earth. Alt, x, y, and z are\nall be in meters. If off, the transform works in the reverse\ndirection. Initial value is on.\n"}, {"SetBaseAltitude", PyvtkGeoSphereTransform_SetBaseAltitude, METH_VARARGS, "V.SetBaseAltitude(float)\nC++: virtual void SetBaseAltitude(double _arg)\n\nThe base altitude to transform coordinates to. This can be useful\nfor transforming lines just above the earth's surface. Default is\n0.\n"}, {"GetBaseAltitude", PyvtkGeoSphereTransform_GetBaseAltitude, METH_VARARGS, "V.GetBaseAltitude() -> float\nC++: virtual double GetBaseAltitude()\n\nThe base altitude to transform coordinates to. This can be useful\nfor transforming lines just above the earth's surface. Default is\n0.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkGeoSphereTransform_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkGeovisCorePython.vtkGeoSphereTransform", // 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 PyvtkGeoSphereTransform_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 *PyvtkGeoSphereTransform_StaticNew() { return vtkGeoSphereTransform::New(); } PyObject *PyvtkGeoSphereTransform_ClassNew() { PyVTKClass_Add( &PyvtkGeoSphereTransform_Type, PyvtkGeoSphereTransform_Methods, "vtkGeoSphereTransform", &PyvtkGeoSphereTransform_StaticNew); PyTypeObject *pytype = &PyvtkGeoSphereTransform_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 *)PyvtkAbstractTransform_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkGeoSphereTransform( PyObject *dict) { PyObject *o; o = PyvtkGeoSphereTransform_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkGeoSphereTransform", o) != 0) { Py_DECREF(o); } }