// python wrapper for vtkGeoTerrain // #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 "vtkGeoTerrain.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkGeoTerrain(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkGeoTerrain_ClassNew(); } #ifndef DECLARED_PyvtkObject_ClassNew extern "C" { PyObject *PyvtkObject_ClassNew(); } #define DECLARED_PyvtkObject_ClassNew #endif static const char *PyvtkGeoTerrain_Doc = "vtkGeoTerrain - A 3D terrain model for the globe.\n\n" "Superclass: vtkObject\n\n" "vtkGeoTerrain contains a multi-resolution tree of geometry\n" "representing the globe. It uses a vtkGeoSource subclass to generate\n" "the terrain, such as vtkGeoGlobeSource. This source must be set\n" "before using the terrain in a vtkGeoView. The terrain also contains\n" "an AddActors() method which will update the set of actors\n" "representing the globe given the current camera position.\n\n"; static PyObject * PyvtkGeoTerrain_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkGeoTerrain::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *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->vtkGeoTerrain::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkGeoTerrain *tempr = vtkGeoTerrain::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoTerrain *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkGeoTerrain::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 * PyvtkGeoTerrain_GetSource(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetSource"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoSource *tempr = (ap.IsBound() ? op->GetSource() : op->vtkGeoTerrain::GetSource()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_SetSource(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetSource"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); vtkGeoSource *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkGeoSource")) { if (ap.IsBound()) { op->SetSource(temp0); } else { op->vtkGeoTerrain::SetSource(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_SaveDatabase(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SaveDatabase"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); char *temp0 = nullptr; int temp1; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SaveDatabase(temp0, temp1); } else { op->vtkGeoTerrain::SaveDatabase(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_AddActors(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "AddActors"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); vtkRenderer *temp0 = nullptr; vtkAssembly *temp1 = nullptr; vtkCollection *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetVTKObject(temp0, "vtkRenderer") && ap.GetVTKObject(temp1, "vtkAssembly") && ap.GetVTKObject(temp2, "vtkCollection")) { if (ap.IsBound()) { op->AddActors(temp0, temp1, temp2); } else { op->vtkGeoTerrain::AddActors(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_SetOrigin_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOrigin"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); double temp0; double temp1; double temp2; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetValue(temp1) && ap.GetValue(temp2)) { if (ap.IsBound()) { op->SetOrigin(temp0, temp1, temp2); } else { op->vtkGeoTerrain::SetOrigin(temp0, temp1, temp2); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_SetOrigin_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOrigin"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); const int size0 = 3; double temp0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { if (ap.IsBound()) { op->SetOrigin(temp0); } else { op->vtkGeoTerrain::SetOrigin(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_SetOrigin(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkGeoTerrain_SetOrigin_s1(self, args); case 1: return PyvtkGeoTerrain_SetOrigin_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "SetOrigin"); return nullptr; } static PyObject * PyvtkGeoTerrain_GetOrigin(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOrigin"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); int sizer = 3; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetOrigin() : op->vtkGeoTerrain::GetOrigin()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkGeoTerrain_SetMaxLevel(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetMaxLevel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetMaxLevel(temp0); } else { op->vtkGeoTerrain::SetMaxLevel(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoTerrain_GetMaxLevelMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMaxLevelMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetMaxLevelMinValue() : op->vtkGeoTerrain::GetMaxLevelMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_GetMaxLevelMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMaxLevelMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetMaxLevelMaxValue() : op->vtkGeoTerrain::GetMaxLevelMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoTerrain_GetMaxLevel(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMaxLevel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoTerrain *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetMaxLevel() : op->vtkGeoTerrain::GetMaxLevel()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkGeoTerrain_Methods[] = { {"IsTypeOf", PyvtkGeoTerrain_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", PyvtkGeoTerrain_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", PyvtkGeoTerrain_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkGeoTerrain\nC++: static vtkGeoTerrain *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkGeoTerrain_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkGeoTerrain\nC++: vtkGeoTerrain *NewInstance()\n\n"}, {"GetSource", PyvtkGeoTerrain_GetSource, METH_VARARGS, "V.GetSource() -> vtkGeoSource\nC++: virtual vtkGeoSource *GetSource()\n\nThe source used to obtain geometry patches.\n"}, {"SetSource", PyvtkGeoTerrain_SetSource, METH_VARARGS, "V.SetSource(vtkGeoSource)\nC++: virtual void SetSource(vtkGeoSource *source)\n\n"}, {"SaveDatabase", PyvtkGeoTerrain_SaveDatabase, METH_VARARGS, "V.SaveDatabase(string, int)\nC++: void SaveDatabase(const char *path, int depth)\n\nSave the set of patches up to a given maximum depth.\n"}, {"AddActors", PyvtkGeoTerrain_AddActors, METH_VARARGS, "V.AddActors(vtkRenderer, vtkAssembly, vtkCollection)\nC++: void AddActors(vtkRenderer *ren, vtkAssembly *assembly,\n vtkCollection *imageReps)\n\nUpdate the actors in an assembly used to render the globe. ren is\nthe current renderer, and imageReps holds the collection of\nvtkGeoAlignedImageRepresentations that will be blended together\nto form the image on the globe.\n"}, {"SetOrigin", PyvtkGeoTerrain_SetOrigin, METH_VARARGS, "V.SetOrigin(float, float, float)\nC++: void SetOrigin(double, double, double)\nV.SetOrigin((float, float, float))\nC++: void SetOrigin(double a[3])\n\n"}, {"GetOrigin", PyvtkGeoTerrain_GetOrigin, METH_VARARGS, "V.GetOrigin() -> (float, float, float)\nC++: double *GetOrigin()\n\n"}, {"SetMaxLevel", PyvtkGeoTerrain_SetMaxLevel, METH_VARARGS, "V.SetMaxLevel(int)\nC++: virtual void SetMaxLevel(int _arg)\n\nThe maximum level of the terrain tree.\n"}, {"GetMaxLevelMinValue", PyvtkGeoTerrain_GetMaxLevelMinValue, METH_VARARGS, "V.GetMaxLevelMinValue() -> int\nC++: virtual int GetMaxLevelMinValue()\n\nThe maximum level of the terrain tree.\n"}, {"GetMaxLevelMaxValue", PyvtkGeoTerrain_GetMaxLevelMaxValue, METH_VARARGS, "V.GetMaxLevelMaxValue() -> int\nC++: virtual int GetMaxLevelMaxValue()\n\nThe maximum level of the terrain tree.\n"}, {"GetMaxLevel", PyvtkGeoTerrain_GetMaxLevel, METH_VARARGS, "V.GetMaxLevel() -> int\nC++: virtual int GetMaxLevel()\n\nThe maximum level of the terrain tree.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkGeoTerrain_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkGeovisCorePython.vtkGeoTerrain", // 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 PyvtkGeoTerrain_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 *PyvtkGeoTerrain_StaticNew() { return vtkGeoTerrain::New(); } PyObject *PyvtkGeoTerrain_ClassNew() { PyVTKClass_Add( &PyvtkGeoTerrain_Type, PyvtkGeoTerrain_Methods, "vtkGeoTerrain", &PyvtkGeoTerrain_StaticNew); PyTypeObject *pytype = &PyvtkGeoTerrain_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 *)PyvtkObject_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkGeoTerrain( PyObject *dict) { PyObject *o; o = PyvtkGeoTerrain_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkGeoTerrain", o) != 0) { Py_DECREF(o); } }