The python export class for Facet. More...
#include <FacetPy.h>
Public Types | |
typedef Facet * | PointerType |
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
FacetPy (Facet *pcObject, PyTypeObject *T=&Type) | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
Facet * | getFacetPtr (void) const |
getter for the object handled by this class | |
virtual PyParentObject * | GetParents (void) |
virtual PyTypeObject * | GetType (void) |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
~FacetPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of FacetPy. | |
static PyMethodDef | Methods [] |
Methods structure of FacetPy. | |
static PyParentObject | Parents [] = { PARENTSMeshFacetPy } |
static PyTypeObject | Type |
Type structure of FacetPy. | |
callbacks and implementers for the python object attributes | |
| |
Py::Boolean | getBound (void) const |
getter for the Bound attribute | |
Py::Int | getIndex (void) const |
getter for the Index attribute | |
Py::Object | getNormal (void) const |
getter for the Normal attribute | |
Py::List | getPoints (void) const |
getter for the Points attribute | |
static PyObject * | staticCallback_getBound (PyObject *self, void *closure) |
getter callback for the Bound attribute | |
static PyObject * | staticCallback_getIndex (PyObject *self, void *closure) |
getter callback for the Index attribute | |
static PyObject * | staticCallback_getNormal (PyObject *self, void *closure) |
getter callback for the Normal attribute | |
static PyObject * | staticCallback_getPoints (PyObject *self, void *closure) |
getter callback for the Points attribute | |
static int | staticCallback_setBound (PyObject *self, PyObject *value, void *closure) |
setter callback for the Bound attribute | |
static int | staticCallback_setIndex (PyObject *self, PyObject *value, void *closure) |
setter callback for the Index attribute | |
static int | staticCallback_setNormal (PyObject *self, PyObject *value, void *closure) |
setter callback for the Normal attribute | |
static int | staticCallback_setPoints (PyObject *self, PyObject *value, void *closure) |
setter callback for the Points attribute | |
callbacks and implementers for the python object methods | |
| |
PyObject * | intersect (PyObject *args) |
implementer for the intersect() method | |
PyObject * | unbound (PyObject *args) |
implementer for the unbound() method | |
static PyObject * | staticCallback_intersect (PyObject *self, PyObject *args) |
callback for the intersect() method | |
static PyObject * | staticCallback_unbound (PyObject *self, PyObject *args) |
callback for the unbound() method |
The python export class for Facet.
Definition at line 20 of file FacetPy.h.
typedef Facet* Mesh::FacetPy::PointerType |
Reimplemented from Base::PyObjectBase.
Definition at line 415 of file FacetPy.cpp.
Referenced by PyMake().
FacetPy::~FacetPy | ( | ) |
Definition at line 424 of file FacetPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
PyObject * FacetPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Base::PyObjectBase.
Definition at line 442 of file FacetPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * FacetPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Base::PyObjectBase.
Definition at line 434 of file FacetPy.cpp.
References representation().
int FacetPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Base::PyObjectBase.
Definition at line 510 of file FacetPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
Py::Boolean FacetPy::getBound | ( | void | ) | const |
getter for the Bound attribute
Definition at line 83 of file FacetPyImp.cpp.
References getFacetPtr().
Referenced by staticCallback_getBound().
PyObject * FacetPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Definition at line 147 of file FacetPyImp.cpp.
Referenced by _getattr().
Facet * FacetPy::getFacetPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 569 of file FacetPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by Mesh::MeshPy::addFacets(), getBound(), getIndex(), getNormal(), getPoints(), intersect(), representation(), and unbound().
Py::Int FacetPy::getIndex | ( | void | ) | const |
getter for the Index attribute
Definition at line 78 of file FacetPyImp.cpp.
References getFacetPtr().
Referenced by staticCallback_getIndex().
Py::Object FacetPy::getNormal | ( | void | ) | const |
getter for the Normal attribute
Definition at line 88 of file FacetPyImp.cpp.
References getFacetPtr(), and Base::PyObjectBase::setConst().
Referenced by staticCallback_getNormal().
virtual PyParentObject* Mesh::FacetPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Py::List FacetPy::getPoints | ( | void | ) | const |
getter for the Points attribute
Definition at line 131 of file FacetPyImp.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, Py::List::append(), getFacetPtr(), pts, Py::Tuple::setItem(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by staticCallback_getPoints().
virtual PyTypeObject* Mesh::FacetPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
implementer for the intersect() method
Definition at line 95 of file FacetPyImp.cpp.
References Py::List::append(), getFacetPtr(), MeshCore::MeshGeomFacet::IntersectWithFacet(), Py::new_reference_to(), Py::Tuple::setItem(), Type, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PyObjectBase.
Definition at line 64 of file FacetPyImp.cpp.
Definition at line 57 of file FacetPyImp.cpp.
References FacetPy().
std::string FacetPy::representation | ( | void | ) | const |
Definition at line 36 of file FacetPyImp.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, getFacetPtr(), Mesh::Facet::Index, Mesh::Facet::isBound(), Mesh::Facet::NIndex, Mesh::Facet::PIndex, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by _repr().
int FacetPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Definition at line 152 of file FacetPyImp.cpp.
Referenced by _setattr().
getter callback for the Bound attribute
Definition at line 312 of file FacetPy.cpp.
References getBound(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Index attribute
Definition at line 280 of file FacetPy.cpp.
References getIndex(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Normal attribute
Definition at line 344 of file FacetPy.cpp.
References getNormal(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
getter callback for the Points attribute
Definition at line 376 of file FacetPy.cpp.
References getPoints(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
callback for the intersect() method
Definition at line 204 of file FacetPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
setter callback for the Bound attribute
Definition at line 330 of file FacetPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
setter callback for the Index attribute
Definition at line 298 of file FacetPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int FacetPy::staticCallback_setNormal | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Normal attribute
Definition at line 362 of file FacetPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
int FacetPy::staticCallback_setPoints | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Points attribute
Definition at line 394 of file FacetPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the unbound() method
Definition at line 128 of file FacetPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the unbound() method
Definition at line 69 of file FacetPyImp.cpp.
References getFacetPtr(), Mesh::Facet::Index, Mesh::Facet::Mesh, and Py_Return.
PyGetSetDef FacetPy::GetterSetter [static] |
{ {"Index", (getter) staticCallback_getIndex, (setter) staticCallback_setIndex, "The index of this facet in the MeshObject", NULL }, {"Bound", (getter) staticCallback_getBound, (setter) staticCallback_setBound, "Bound state of the facet", NULL }, {"Normal", (getter) staticCallback_getNormal, (setter) staticCallback_setNormal, "Normal vector of the facet.", NULL }, {"Points", (getter) staticCallback_getPoints, (setter) staticCallback_setPoints, "A list of points of the facet", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of FacetPy.
PyMethodDef FacetPy::Methods [static] |
{ {"unbound", (PyCFunction) staticCallback_unbound, METH_VARARGS, "method unbound()\nCut the connection to a MeshObject. The facet becomes\nfree and is more or less a simple facet.\nAfter calling unbound() no topological operation will\nwork!\n " }, {"intersect", (PyCFunction) staticCallback_intersect, METH_VARARGS, "intersect(Facet) -> list \nGet a list of intersection points with another triangle.\n " }, {NULL, NULL, 0, NULL} }
Methods structure of FacetPy.
Reimplemented from Base::PyObjectBase.
Definition at line 24 of file FacetPy.h.
Referenced by _getattr().
PyParentObject FacetPy::Parents = { PARENTSMeshFacetPy } [static] |
Reimplemented from Base::PyObjectBase.
PyTypeObject FacetPy::Type [static] |
Type structure of FacetPy.
Reimplemented from Base::PyObjectBase.
Definition at line 23 of file FacetPy.h.
Referenced by Mesh::MeshPy::addFacets(), initMesh(), and intersect().