// python wrapper for vtkFollower // #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 "vtkFollower.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkFollower(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkFollower_ClassNew(); } #ifndef DECLARED_PyvtkActor_ClassNew extern "C" { PyObject *PyvtkActor_ClassNew(); } #define DECLARED_PyvtkActor_ClassNew #endif static const char *PyvtkFollower_Doc = "vtkFollower - a subclass of actor that always faces the camera\n\n" "Superclass: vtkActor\n\n" "vtkFollower is a subclass of vtkActor that always follows its\n" "specified camera. More specifically it will not change its position\n" "or scale, but it will continually update its orientation so that it\n" "is right side up and facing the camera. This is typically used for\n" "text labels in a scene. All of the adjustments that can be made to an\n" "actor also will take effect with a follower. So, if you change the\n" "orientation of the follower by 90 degrees, then it will follow the\n" "camera, but be off by 90 degrees.\n\n" "@sa\n" "vtkActor vtkCamera vtkAxisFollower vtkProp3DFollower\n\n"; static PyObject * PyvtkFollower_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkFollower::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFollower_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *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->vtkFollower::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFollower_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkFollower *tempr = vtkFollower::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkFollower_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkFollower *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkFollower::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 * PyvtkFollower_SetCamera(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetCamera"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkCamera *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkCamera")) { if (ap.IsBound()) { op->SetCamera(temp0); } else { op->vtkFollower::SetCamera(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFollower_GetCamera(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCamera"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCamera *tempr = (ap.IsBound() ? op->GetCamera() : op->vtkFollower::GetCamera()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkFollower_RenderOpaqueGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderOpaqueGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkViewport *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkViewport")) { int tempr = (ap.IsBound() ? op->RenderOpaqueGeometry(temp0) : op->vtkFollower::RenderOpaqueGeometry(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFollower_RenderTranslucentPolygonalGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RenderTranslucentPolygonalGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkViewport *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkViewport")) { int tempr = (ap.IsBound() ? op->RenderTranslucentPolygonalGeometry(temp0) : op->vtkFollower::RenderTranslucentPolygonalGeometry(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFollower_Render(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Render"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkRenderer *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkRenderer")) { if (ap.IsBound()) { op->Render(temp0); } else { op->vtkFollower::Render(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFollower_HasTranslucentPolygonalGeometry(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "HasTranslucentPolygonalGeometry"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->HasTranslucentPolygonalGeometry() : op->vtkFollower::HasTranslucentPolygonalGeometry()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkFollower_ReleaseGraphicsResources(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ReleaseGraphicsResources"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkWindow *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkWindow")) { if (ap.IsBound()) { op->ReleaseGraphicsResources(temp0); } else { op->vtkFollower::ReleaseGraphicsResources(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFollower_ComputeMatrix(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ComputeMatrix"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ComputeMatrix(); } else { op->vtkFollower::ComputeMatrix(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkFollower_ShallowCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ShallowCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkFollower *op = static_cast(vp); vtkProp *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkProp")) { if (ap.IsBound()) { op->ShallowCopy(temp0); } else { op->vtkFollower::ShallowCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkFollower_Methods[] = { {"IsTypeOf", PyvtkFollower_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", PyvtkFollower_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", PyvtkFollower_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkFollower\nC++: static vtkFollower *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkFollower_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkFollower\nC++: vtkFollower *NewInstance()\n\n"}, {"SetCamera", PyvtkFollower_SetCamera, METH_VARARGS, "V.SetCamera(vtkCamera)\nC++: virtual void SetCamera(vtkCamera *)\n\nSet/Get the camera to follow. If this is not set, then the\nfollower won't know who to follow.\n"}, {"GetCamera", PyvtkFollower_GetCamera, METH_VARARGS, "V.GetCamera() -> vtkCamera\nC++: virtual vtkCamera *GetCamera()\n\nSet/Get the camera to follow. If this is not set, then the\nfollower won't know who to follow.\n"}, {"RenderOpaqueGeometry", PyvtkFollower_RenderOpaqueGeometry, METH_VARARGS, "V.RenderOpaqueGeometry(vtkViewport) -> int\nC++: int RenderOpaqueGeometry(vtkViewport *viewport) override;\n\nThis causes the actor to be rendered. It in turn will render the\nactor's property, texture map and then mapper. If a property\nhasn't been assigned, then the actor will create one\nautomatically.\n"}, {"RenderTranslucentPolygonalGeometry", PyvtkFollower_RenderTranslucentPolygonalGeometry, METH_VARARGS, "V.RenderTranslucentPolygonalGeometry(vtkViewport) -> int\nC++: int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)\n override;\n\nThis causes the actor to be rendered. It in turn will render the\nactor's property, texture map and then mapper. If a property\nhasn't been assigned, then the actor will create one\nautomatically.\n"}, {"Render", PyvtkFollower_Render, METH_VARARGS, "V.Render(vtkRenderer)\nC++: virtual void Render(vtkRenderer *ren)\n\nThis causes the actor to be rendered. It in turn will render the\nactor's property, texture map and then mapper. If a property\nhasn't been assigned, then the actor will create one\nautomatically.\n"}, {"HasTranslucentPolygonalGeometry", PyvtkFollower_HasTranslucentPolygonalGeometry, METH_VARARGS, "V.HasTranslucentPolygonalGeometry() -> int\nC++: int HasTranslucentPolygonalGeometry() override;\n\nDoes this prop have some translucent polygonal geometry?\n"}, {"ReleaseGraphicsResources", PyvtkFollower_ReleaseGraphicsResources, METH_VARARGS, "V.ReleaseGraphicsResources(vtkWindow)\nC++: void ReleaseGraphicsResources(vtkWindow *) override;\n\nRelease any graphics resources associated with this\nvtkProp3DFollower.\n"}, {"ComputeMatrix", PyvtkFollower_ComputeMatrix, METH_VARARGS, "V.ComputeMatrix()\nC++: void ComputeMatrix() override;\n\nGenerate the matrix based on ivars. This method overloads its\nsuperclasses ComputeMatrix() method due to the special\nvtkFollower matrix operations.\n"}, {"ShallowCopy", PyvtkFollower_ShallowCopy, METH_VARARGS, "V.ShallowCopy(vtkProp)\nC++: void ShallowCopy(vtkProp *prop) override;\n\nShallow copy of a follower. Overloads the virtual vtkProp method.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkFollower_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkRenderingCorePython.vtkFollower", // 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 PyvtkFollower_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 *PyvtkFollower_StaticNew() { return vtkFollower::New(); } PyObject *PyvtkFollower_ClassNew() { PyVTKClass_Add( &PyvtkFollower_Type, PyvtkFollower_Methods, "vtkFollower", &PyvtkFollower_StaticNew); PyTypeObject *pytype = &PyvtkFollower_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 *)PyvtkActor_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkFollower( PyObject *dict) { PyObject *o; o = PyvtkFollower_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkFollower", o) != 0) { Py_DECREF(o); } }