diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-31 12:50:12 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-31 12:50:12 +0400 |
commit | 3010f2b753f2397256861816504b8e7d697632db (patch) | |
tree | cee975b7fc574c43be0d462447c87056c4bdfc6b /source/blender/freestyle/intern/python/Director.h | |
parent | a482f644242456ad6ddf0306e1b37d8855342103 (diff) |
soc-2008-mxcurioni: the native Python system now supports cross-language polymorphism for the following classes: BinaryPredicate0D (__call__), BinaryPredicate1D (__call__), UnaryPredicate0D (__call__), UnaryPredicate1D (__call__), StrokeShader (shade), ChainingIterator (init, traverse).
Other methods could easily be supported in the future. The method now works as planned for the contour style. For style modules with Python shaders, there still is a problem that I will fix right away.
Diffstat (limited to 'source/blender/freestyle/intern/python/Director.h')
-rw-r--r-- | source/blender/freestyle/intern/python/Director.h | 67 |
1 files changed, 49 insertions, 18 deletions
diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h index 7114b124ffb..95ab16047a8 100644 --- a/source/blender/freestyle/intern/python/Director.h +++ b/source/blender/freestyle/intern/python/Director.h @@ -1,34 +1,65 @@ #ifndef FREESTYLE_PYTHON_DIRECTOR # define FREESTYLE_PYTHON_DIRECTOR -#include "../view_map/Interface1D.h" +class Interface0D; +class Interface1D; +class Interface0DIterator; +class Stroke; +class AdjacencyIterator; +class ViewEdge; #ifdef __cplusplus extern "C" { #endif -/////////////////////////////////////////////////////////////////////////////////////////// - #include <Python.h> -// SWIG directors -// ---------------------------- -// ViewEdgeInternal::ViewEdgeIterator; -// ChainingIterator; -// ChainSilhouetteIterator; -// ChainPredicateIterator; -// UnaryPredicate0D; -// UnaryPredicate1D; -// BinaryPredicate1D; -// StrokeShader; - -bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D); - -/////////////////////////////////////////////////////////////////////////////////////////// - #ifdef __cplusplus } #endif +// BinaryPredicate0D: __call__ +bool Director_BPy_BinaryPredicate0D___call__( PyObject *obj, Interface0D& i1, Interface0D& i2); + +// BinaryPredicate1D: __call__ +bool Director_BPy_BinaryPredicate1D___call__( PyObject *obj, Interface1D& i1, Interface1D& i2); + +// UnaryPredicate0D: __call__ +bool Director_BPy_UnaryPredicate0D___call__( PyObject *obj, Interface0DIterator& if0D_it); + +// UnaryPredicate1D: __call__ +bool Director_BPy_UnaryPredicate1D___call__( PyObject *obj, Interface1D& if1D); + +// StrokeShader: shade +void Director_BPy_StrokeShader_shade( PyObject *obj, Stroke& s); + +// ChainingIterator: init, traverse +void Director_BPy_ChainingIterator_init( PyObject *obj ); +ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyIterator& a_it ); + +// BPy_UnaryFunction0DDouble +double Director_BPy_UnaryFunction0DDouble___call__( PyObject *obj, Interface0DIterator& if0D_it); +// BPy_UnaryFunction0DEdgeNature +// BPy_UnaryFunction0DFloat +// BPy_UnaryFunction0DId +// BPy_UnaryFunction0DMaterial +// BPy_UnaryFunction0DUnsigned +// BPy_UnaryFunction0DVec2f +// BPy_UnaryFunction0DVec3f +// BPy_UnaryFunction0DVectorViewShape +// BPy_UnaryFunction0DViewShape + +// BPy_UnaryFunction1DDouble +// BPy_UnaryFunction1DEdgeNature +// BPy_UnaryFunction1DFloat +// BPy_UnaryFunction1DUnsigned +// BPy_UnaryFunction1DVec2f +// BPy_UnaryFunction1DVec3f +// BPy_UnaryFunction1DVectorViewShape +// BPy_UnaryFunction1DVoid +void Director_BPy_UnaryFunction1DVoid___call__( PyObject *obj, Interface1D& if1D); + + + #endif // FREESTYLE_PYTHON_DIRECTOR |