soc-2008-mxcurioni: first version of lib3ds code. It does NOT work yet and has to...
[blender.git] / source / blender / freestyle / intern / python / BPy_Convert.h
1 #ifndef FREESTYLE_PYTHON_CONVERT_H
2 #define FREESTYLE_PYTHON_CONVERT_H
3
4
5 #include "../geometry/Geom.h"
6 using namespace Geometry;
7
8 // BBox
9 #include "../geometry/BBox.h"
10
11 // FEdge, FEdgeSharp, FEdgeSmooth, SShape, SVertex, FEdgeInternal::SVertexIterator
12 #include "../view_map/Silhouette.h" 
13
14 // Id
15 #include "../system/Id.h"
16
17 // Interface0D, Interface0DIteratorNested, Interface0DIterator
18 #include "../view_map/Interface0D.h"
19
20 // Interface1D
21 #include "../view_map/Interface1D.h"
22
23 // FrsMaterial
24 #include "../scene_graph/FrsMaterial.h"
25
26 // Nature::VertexNature, Nature::EdgeNature
27 #include "../winged_edge/Nature.h"
28
29 // Stroke, StrokeAttribute, StrokeVertex
30 #include "../stroke/Stroke.h"
31
32 // NonTVertex, TVertex, ViewEdge, ViewMap, ViewShape, ViewVertex
33 #include "../view_map/ViewMap.h"
34
35 // CurvePoint, Curve
36 #include "../stroke/Curve.h"
37
38 //====== ITERATORS
39
40 // AdjacencyIterator, ChainingIterator, ChainSilhouetteIterator, ChainPredicateIterator
41 #include "../stroke/ChainingIterators.h"
42
43 // ViewVertexInternal::orientedViewEdgeIterator
44 // ViewEdgeInternal::SVertexIterator
45 // ViewEdgeInternal::ViewEdgeIterator
46 #include "../view_map/ViewMapIterators.h"
47
48 // StrokeInternal::StrokeVertexIterator
49 #include "../stroke/StrokeIterators.h"
50
51 // CurveInternal::CurvePointIterator
52 #include "../stroke/CurveIterators.h"
53
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57
58 ///////////////////////////////////////////////////////////////////////////////////////////
59
60 #include <Python.h>
61 #include "api2_2x/vector.h"
62 #include "api2_2x/gen_utils.h"
63
64 //==============================
65 // C++ => Python
66 //==============================
67
68 PyObject * PyBool_from_bool( bool b );
69 PyObject * Vector_from_Vec2f( Vec2f& v );
70 PyObject * Vector_from_Vec3f( Vec3f& v );
71 PyObject * Vector_from_Vec3r( Vec3r& v );
72
73 PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb );
74 PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp );
75 PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve );
76 PyObject * BPy_FEdge_from_FEdge( FEdge& fe );
77 PyObject * BPy_Id_from_Id( Id& id );
78 PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D );
79 PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D );
80 PyObject * BPy_IntegrationType_from_IntegrationType( int i );
81 PyObject * BPy_FrsMaterial_from_FrsMaterial( FrsMaterial& m );
82 PyObject * BPy_Nature_from_Nature( unsigned short n );
83 PyObject * BPy_MediumType_from_MediumType( int n );
84 PyObject * BPy_SShape_from_SShape( SShape& ss );
85 PyObject * BPy_Stroke_from_Stroke_ptr( Stroke* s );
86 PyObject * BPy_StrokeAttribute_from_StrokeAttribute_ptr( StrokeAttribute *sa );
87 PyObject * BPy_StrokeVertex_from_StrokeVertex_ptr( StrokeVertex *sv );
88 PyObject * BPy_SVertex_from_SVertex_ptr( SVertex *sv );
89 PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv );
90 PyObject * BPy_ViewEdge_from_ViewEdge_ptr( ViewEdge *ve );
91 PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs );
92
93 PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it );
94 PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it );
95 PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it );
96 PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it);
97 PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it );
98 PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it );
99 PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it );
100 PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it );
101 PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it );
102 PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it );
103
104 //==============================
105 // Python => C++
106 //==============================
107
108 bool bool_from_PyBool( PyObject *b );
109 IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj );
110 Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj );
111 Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj );
112 Vec2f * Vec2f_ptr_from_Vector( PyObject* obj );
113 Vec3f * Vec3f_ptr_from_Vector( PyObject* obj );
114 Vec3r * Vec3r_ptr_from_Vector( PyObject* obj );
115
116
117
118 ///////////////////////////////////////////////////////////////////////////////////////////
119
120 #ifdef __cplusplus
121 }
122 #endif
123
124
125 #endif /* FREESTYLE_PYTHON_CONVERT_H */