So far, whenever a Python object is created from its corresponding C++ object, the input object reference is copied into a new object. Due to Freestyle's functions (especially regarding the way it is iterated), it is currently impossible to deal with a pointer-based Python object. It is not a real drawback, just an aspect to keep in mind.
41 lines
979 B
C++
41 lines
979 B
C++
#ifndef FREESTYLE_PYTHON_CONVERT_H
|
|
#define FREESTYLE_PYTHON_CONVERT_H
|
|
|
|
#include "../geometry/Geom.h"
|
|
using namespace Geometry;
|
|
|
|
#include "Id.h"
|
|
#include "Interface0D.h"
|
|
#include "Interface0D/SVertex.h"
|
|
#include "Interface1D/FEdge.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include <Python.h>
|
|
#include "api2_2x/vector.h"
|
|
#include "api2_2x/gen_utils.h"
|
|
|
|
PyObject * PyBool_from_bool( bool b );
|
|
|
|
PyObject * Vector_from_Vec2f( Vec2f& v );
|
|
PyObject * Vector_from_Vec3f( Vec3f& v );
|
|
PyObject * Vector_from_Vec3r( Vec3r& v );
|
|
|
|
PyObject * BPy_Id_from_Id( Id& id );
|
|
PyObject * BPy_SVertex_from_SVertex( SVertex& sv );
|
|
PyObject * BPy_FEdge_from_FEdge( FEdge& fe );
|
|
PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D );
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* FREESTYLE_PYTHON_CONVERT_H */
|