// python wrapper for vtkHyperOctreeCursor // #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 "vtkHyperOctreeCursor.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkHyperOctreeCursor(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkHyperOctreeCursor_ClassNew(); } #ifndef DECLARED_PyvtkObject_ClassNew extern "C" { PyObject *PyvtkObject_ClassNew(); } #define DECLARED_PyvtkObject_ClassNew #endif static const char *PyvtkHyperOctreeCursor_Doc = "vtkHyperOctreeCursor - Objects that can traverse hyperoctree nodes.\n\n" "Superclass: vtkObject\n\n" "Objects that can traverse hyperoctree nodes. It is an abstract class.\n" "Cursors are created by the hyperoctree.\n" "@sa\n" "vtkDataObject vtkFieldData vtkHyperOctreeAlgorithm\n\n"; static PyObject * PyvtkHyperOctreeCursor_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkHyperOctreeCursor::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *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->vtkHyperOctreeCursor::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkHyperOctreeCursor *tempr = vtkHyperOctreeCursor::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkHyperOctreeCursor *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkHyperOctreeCursor::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 * PyvtkHyperOctreeCursor_GetLeafId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLeafId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetLeafId(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_CurrentIsLeaf(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CurrentIsLeaf"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->CurrentIsLeaf(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_CurrentIsRoot(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CurrentIsRoot"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->CurrentIsRoot(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_GetCurrentLevel(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCurrentLevel"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetCurrentLevel(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_GetChildIndex(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetChildIndex"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetChildIndex(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_CurrentIsTerminalNode(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CurrentIsTerminalNode"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->CurrentIsTerminalNode(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_ToRoot(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToRoot"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { op->ToRoot(); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkHyperOctreeCursor_ToParent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToParent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { op->ToParent(); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkHyperOctreeCursor_ToChild(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToChild"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetValue(temp0)) { op->ToChild(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkHyperOctreeCursor_ToSameNode(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ToSameNode"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); vtkHyperOctreeCursor *temp0 = nullptr; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkHyperOctreeCursor")) { op->ToSameNode(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkHyperOctreeCursor_IsEqual(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsEqual"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); vtkHyperOctreeCursor *temp0 = nullptr; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkHyperOctreeCursor")) { int tempr = op->IsEqual(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_Clone(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Clone"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { vtkHyperOctreeCursor *tempr = op->Clone(); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_SameTree(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SameTree"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); vtkHyperOctreeCursor *temp0 = nullptr; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkHyperOctreeCursor")) { int tempr = op->SameTree(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_GetIndex(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetIndex"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = op->GetIndex(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_GetNumberOfChildren(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfChildren"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetNumberOfChildren(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_GetDimension(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDimension"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetDimension(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkHyperOctreeCursor_MoveToNode(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "MoveToNode"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); int size0 = ap.GetArgSize(0); vtkPythonArgs::Array store0(2*size0); int *temp0 = store0.Data(); int *save0 = (size0 == 0 ? nullptr : temp0 + size0); int temp1; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetValue(temp1)) { ap.SaveArray(temp0, save0, size0); op->MoveToNode(temp0, temp1); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkHyperOctreeCursor_Found(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Found"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkHyperOctreeCursor *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->Found(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkHyperOctreeCursor_Methods[] = { {"IsTypeOf", PyvtkHyperOctreeCursor_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", PyvtkHyperOctreeCursor_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", PyvtkHyperOctreeCursor_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkHyperOctreeCursor\nC++: static vtkHyperOctreeCursor *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkHyperOctreeCursor_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkHyperOctreeCursor\nC++: vtkHyperOctreeCursor *NewInstance()\n\n"}, {"GetLeafId", PyvtkHyperOctreeCursor_GetLeafId, METH_VARARGS, "V.GetLeafId() -> int\nC++: virtual int GetLeafId()\n\nReturn the index of the current leaf in the data arrays.\n\\pre is_leaf: CurrentIsLeaf()\n"}, {"CurrentIsLeaf", PyvtkHyperOctreeCursor_CurrentIsLeaf, METH_VARARGS, "V.CurrentIsLeaf() -> int\nC++: virtual int CurrentIsLeaf()\n\nIs the node pointed by the cursor a leaf?\n"}, {"CurrentIsRoot", PyvtkHyperOctreeCursor_CurrentIsRoot, METH_VARARGS, "V.CurrentIsRoot() -> int\nC++: virtual int CurrentIsRoot()\n\nIs the node pointed by the cursor the root?\n"}, {"GetCurrentLevel", PyvtkHyperOctreeCursor_GetCurrentLevel, METH_VARARGS, "V.GetCurrentLevel() -> int\nC++: virtual int GetCurrentLevel()\n\nReturn the level of the node pointed by the cursor.\n\\post positive_result: result>=0\n"}, {"GetChildIndex", PyvtkHyperOctreeCursor_GetChildIndex, METH_VARARGS, "V.GetChildIndex() -> int\nC++: virtual int GetChildIndex()\n\nReturn the child number of the current node relative to its\nparent.\n\\pre not_root: !CurrentIsRoot().\n\\post valid_range: result>=0 && result int\nC++: virtual int CurrentIsTerminalNode()\n\n"}, {"ToRoot", PyvtkHyperOctreeCursor_ToRoot, METH_VARARGS, "V.ToRoot()\nC++: virtual void ToRoot()\n\nMove the cursor the root node.\n\\pre can be root\n\\post is_root: CurrentIsRoot()\n"}, {"ToParent", PyvtkHyperOctreeCursor_ToParent, METH_VARARGS, "V.ToParent()\nC++: virtual void ToParent()\n\nMove the cursor to the parent of the current node.\n\\pre not_root: !CurrentIsRoot()\n"}, {"ToChild", PyvtkHyperOctreeCursor_ToChild, METH_VARARGS, "V.ToChild(int)\nC++: virtual void ToChild(int child)\n\nMove the cursor to child `child' of the current node.\n\\pre not_leaf: !CurrentIsLeaf()\n\\pre valid_child: child>=0 && childGetNumberOfChildren()\n"}, {"ToSameNode", PyvtkHyperOctreeCursor_ToSameNode, METH_VARARGS, "V.ToSameNode(vtkHyperOctreeCursor)\nC++: virtual void ToSameNode(vtkHyperOctreeCursor *other)\n\nMove the cursor to the same node pointed by `other'.\n\\pre other_exists: other!=0\n\\pre same_hyperoctree: this->SameTree(other);\n\\post equal: this->IsEqual(other)\n"}, {"IsEqual", PyvtkHyperOctreeCursor_IsEqual, METH_VARARGS, "V.IsEqual(vtkHyperOctreeCursor) -> int\nC++: virtual int IsEqual(vtkHyperOctreeCursor *other)\n\nIs `this' equal to `other'?\n\\pre other_exists: other!=0\n\\pre same_hyperoctree: this->SameTree(other);\n"}, {"Clone", PyvtkHyperOctreeCursor_Clone, METH_VARARGS, "V.Clone() -> vtkHyperOctreeCursor\nC++: virtual vtkHyperOctreeCursor *Clone()\n\nCreate a copy of `this'.\n\\post results_exists:result!=0\n\\post same_tree: result->SameTree(this)\n"}, {"SameTree", PyvtkHyperOctreeCursor_SameTree, METH_VARARGS, "V.SameTree(vtkHyperOctreeCursor) -> int\nC++: virtual int SameTree(vtkHyperOctreeCursor *other)\n\nAre `this' and `other' pointing on the same hyperoctree?\n\\pre other_exists: other!=0\n"}, {"GetIndex", PyvtkHyperOctreeCursor_GetIndex, METH_VARARGS, "V.GetIndex(int) -> int\nC++: virtual int GetIndex(int d)\n\nReturn the index in dimension `d', as if the node was a cell of a\nuniform grid of 1<=0 && d=0 && result<(1< int\nC++: virtual int GetNumberOfChildren()\n\nReturn the number of children for each node of the tree.\n\\post positive_number: result>0\n"}, {"GetDimension", PyvtkHyperOctreeCursor_GetDimension, METH_VARARGS, "V.GetDimension() -> int\nC++: virtual int GetDimension()\n\nReturn the dimension of the tree.\n\\post positive_result: result>0\n"}, {"MoveToNode", PyvtkHyperOctreeCursor_MoveToNode, METH_VARARGS, "V.MoveToNode([int, ...], int)\nC++: virtual void MoveToNode(int *indices, int level)\n\nMove to the node described by its indices in each dimension and\nat a given level. If there is actually a node or a leaf at this\nlocation, Found() returns true. Otherwise, Found() returns false\nand the cursor moves to the closest parent of the query. It can\nbe the root in the worst case.\n\\pre indices_exists: indices!=0\n\\pre valid_size: sizeof(indices)==GetDimension()\n\\pre valid_level: level>=0\n"}, {"Found", PyvtkHyperOctreeCursor_Found, METH_VARARGS, "V.Found() -> int\nC++: virtual int Found()\n\nDid the last call to MoveToNode succeed?\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkHyperOctreeCursor_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonDataModelPython.vtkHyperOctreeCursor", // 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 PyvtkHyperOctreeCursor_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 }; PyObject *PyvtkHyperOctreeCursor_ClassNew() { PyVTKClass_Add( &PyvtkHyperOctreeCursor_Type, PyvtkHyperOctreeCursor_Methods, "vtkHyperOctreeCursor", nullptr); PyTypeObject *pytype = &PyvtkHyperOctreeCursor_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_vtkHyperOctreeCursor( PyObject *dict) { PyObject *o; o = PyvtkHyperOctreeCursor_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkHyperOctreeCursor", o) != 0) { Py_DECREF(o); } for (int c = 0; c < 8; c++) { static const struct { const char *name; int value; } constants[8] = { { "VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN", VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN }, { "VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX", VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX }, { "VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN", VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN }, { "VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX", VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX }, { "VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN", VTK_OCTREE_CHILD_ZMAX_YMIN_XMIN }, { "VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX", VTK_OCTREE_CHILD_ZMAX_YMIN_XMAX }, { "VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN", VTK_OCTREE_CHILD_ZMAX_YMAX_XMIN }, { "VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX", VTK_OCTREE_CHILD_ZMAX_YMAX_XMAX }, }; o = PyInt_FromLong(constants[c].value); if (o) { PyDict_SetItemString(dict, constants[c].name, o); Py_DECREF(o); } } for (int c = 0; c < 6; c++) { static const struct { const char *name; int value; } constants[6] = { { "VTK_QUADTREE_CHILD_SW", VTK_OCTREE_CHILD_ZMIN_YMIN_XMIN }, { "VTK_QUADTREE_CHILD_SE", VTK_OCTREE_CHILD_ZMIN_YMIN_XMAX }, { "VTK_QUADTREE_CHILD_NW", VTK_OCTREE_CHILD_ZMIN_YMAX_XMIN }, { "VTK_QUADTREE_CHILD_NE", VTK_OCTREE_CHILD_ZMIN_YMAX_XMAX }, { "VTK_BINARY_TREE_CHILD_LEFT", VTK_QUADTREE_CHILD_SW }, { "VTK_BINARY_TREE_CHILD_RIGHT", VTK_QUADTREE_CHILD_SE }, }; o = PyInt_FromLong(constants[c].value); if (o) { PyDict_SetItemString(dict, constants[c].name, o); Py_DECREF(o); } } }