Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-24 12:29:48 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-24 12:29:48 +0400
commita0359c37506d05589bae86e4818fa653c8f281ab (patch)
tree35927f22801fa65585ac6f076abb29406189dd2a /source
parentdd899939dabae68564f7a1d1994b50ee2f2cf8be (diff)
soc-2008-mxcurioni: added (without testing) the following classes: BBox, SShape, ViewShape. Also corrected a few typos (Get#->get#).
Diffstat (limited to 'source')
-rw-r--r--source/blender/freestyle/SConscript23
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp142
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.h38
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp31
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.h9
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp7
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_Material.h0
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp301
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.h34
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp291
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.h34
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h1
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp553
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h32
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/stroke/ChainingIterators.h10
-rwxr-xr-xsource/blender/freestyle/intern/stroke/CurveIterators.h6
-rwxr-xr-xsource/blender/freestyle/intern/stroke/Operators.cpp8
-rwxr-xr-xsource/blender/freestyle/intern/swig/ModuleWrapper.cpp362
-rwxr-xr-xsource/blender/freestyle/intern/view_map/FEdgeXDetector.cpp8
-rwxr-xr-xsource/blender/freestyle/intern/view_map/Interface0D.h14
-rwxr-xr-xsource/blender/freestyle/intern/view_map/Silhouette.h12
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp6
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMap.h4
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMapIO.cpp18
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMapIterators.h4
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/Curvature.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WEdge.cpp16
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WEdge.h6
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WXEdge.h2
-rwxr-xr-xsource/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp20
-rwxr-xr-xsource/blender/freestyle/python/Freestyle.py18
38 files changed, 1565 insertions, 461 deletions
diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript
index 3c9f2abebe3..ed6beefd337 100644
--- a/source/blender/freestyle/SConscript
+++ b/source/blender/freestyle/SConscript
@@ -62,27 +62,38 @@ prefix = 'intern/python'
python_sources = [
prefix + '/BPy_Freestyle.cpp',
prefix + '/BPy_Convert.cpp',
+ prefix + '/BPy_BBox.cpp',
prefix + '/BPy_BinaryPredicate0D.cpp',
prefix + '/BPy_BinaryPredicate1D.cpp',
prefix + '/BPy_Id.cpp',
prefix + '/BPy_IntegrationType.cpp',
prefix + '/BPy_Interface0D.cpp',
- prefix + '/Interface0D/BPy_CurvePoint.cpp',
- prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp',
- prefix + '/Interface0D/BPy_SVertex.cpp',
- prefix + '/Interface0D/BPy_ViewVertex.cpp',
+ prefix + '/Interface0D/BPy_CurvePoint.cpp',
+ prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp',
+ prefix + '/Interface0D/BPy_SVertex.cpp',
+ prefix + '/Interface0D/BPy_ViewVertex.cpp',
prefix + '/BPy_Interface1D.cpp',
- prefix + '/Interface1D/BPy_FEdge.cpp',
- prefix + '/Interface1D/BPy_Stroke.cpp',
+ prefix + '/Interface1D/BPy_FEdge.cpp',
+ prefix + '/Interface1D/BPy_Stroke.cpp',
+ prefix + '/Interface1D/BPy_ViewEdge.cpp',
prefix + '/BPy_Iterator.cpp',
+ prefix + '/Iterator/BPy_AdjacencyIterator.cpp',
+ prefix + '/Iterator/BPy_Interface0DIterator.cpp',
+ prefix + '/Iterator/BPy_CurvePointIterator.cpp',
+ prefix + '/Iterator/BPy_StrokeVertexIterator.cpp',
+ prefix + '/Iterator/BPy_SVertexIterator.cpp',
+ prefix + '/Iterator/BPy_orientedViewEdgeIterator.cpp',
+ prefix + '/Iterator/BPy_ViewEdgeIterator.cpp',
prefix + '/BPy_MediumType.cpp',
prefix + '/BPy_Nature.cpp',
+ prefix + '/BPy_SShape.cpp',
prefix + '/BPy_StrokeAttribute.cpp',
prefix + '/BPy_StrokeShader.cpp',
prefix + '/BPy_UnaryFunction0D.cpp',
prefix + '/BPy_UnaryFunction1D.cpp',
prefix + '/BPy_UnaryPredicate0D.cpp',
prefix + '/BPy_UnaryPredicate1D.cpp',
+ prefix + '/BPy_ViewShape.cpp'
]
sources = system_sources + image_sources + geometry_sources + scene_graph_sources \
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
new file mode 100644
index 00000000000..ac15672580d
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp
@@ -0,0 +1,142 @@
+#include "BPy_BBox.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for BBox instance -----------*/
+static int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds);
+static void BBox___dealloc__(BPy_BBox *self);
+static PyObject * BBox___repr__(BPy_BBox *self);
+
+/*----------------------BBox instance definitions ----------------------------*/
+static PyMethodDef BPy_BBox_methods[] = {
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_BBox type definition ------------------------------*/
+
+PyTypeObject BBox_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "BBox", /* tp_name */
+ sizeof( BPy_BBox ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ (destructor)BBox___dealloc__, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ (reprfunc)BBox___repr__, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_BBox_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ NULL, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)BBox___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ PyType_GenericNew, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+PyMODINIT_FUNC BBox_Init( PyObject *module )
+{
+ if( module == NULL )
+ return;
+
+ if( PyType_Ready( &BBox_Type ) < 0 )
+ return;
+
+ Py_INCREF( &BBox_Type );
+ PyModule_AddObject(module, "BBox", (PyObject *)&BBox_Type);
+}
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds)
+{
+ self->bb = new BBox< Vec3r>();
+ return 0;
+}
+
+void BBox___dealloc__(BPy_BBox* self)
+{
+ delete self->bb;
+ self->ob_type->tp_free((PyObject*)self);
+}
+
+
+PyObject * BBox___repr__(BPy_BBox* self)
+{
+ return PyString_FromFormat("BBox - address: %p", self->bb );
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.h b/source/blender/freestyle/intern/python/BPy_BBox.h
new file mode 100644
index 00000000000..88bba3301bb
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_BBox.h
@@ -0,0 +1,38 @@
+#ifndef FREESTYLE_PYTHON_BBOX_H
+#define FREESTYLE_PYTHON_BBOX_H
+
+#include "../geometry/BBox.h"
+#include "../geometry/Geom.h"
+using namespace Geometry;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject BBox_Type;
+
+#define BPy_BBox_Check(v) (( (PyObject *) v)->ob_type == &BBox_Type)
+
+/*---------------------------Python BPy_BBox structure definition----------*/
+typedef struct {
+ PyObject_HEAD
+ BBox<Vec3r> *bb;
+} BPy_BBox;
+
+/*---------------------------Python BPy_BBox visible prototypes-----------*/
+
+PyMODINIT_FUNC BBox_Init( PyObject *module );
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* FREESTYLE_PYTHON_BBOX_H */
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 89fa677aac0..c052acb446f 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -105,6 +105,37 @@ PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ) {
return py_sv;
}
+PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ) {
+ PyObject *py_vv = ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 );
+ ((BPy_ViewVertex *) py_vv)->vv = vv;
+ ((BPy_ViewVertex *) py_vv)->py_if0D.if0D = ((BPy_ViewVertex *) py_vv)->vv;
+
+ return py_vv;
+}
+
+PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ) {
+ PyObject *py_bb = BBox_Type.tp_new( &BBox_Type, 0, 0 );
+ ((BPy_BBox *) py_bb)->bb = new BBox< Vec3r >( bb );
+
+ return py_bb;
+}
+
+PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ) {
+ PyObject *py_ve = ViewEdge_Type.tp_new( &ViewEdge_Type, 0, 0 );
+ ((BPy_ViewEdge *) py_ve)->ve = new ViewEdge( ve );
+ ((BPy_ViewEdge *) py_ve)->py_if1D.if1D = ((BPy_ViewEdge *) py_ve)->ve;
+
+ return py_ve;
+}
+
+PyObject * BPy_SShape_from_SShape( SShape& ss ) {
+ PyObject *py_ss = SShape_Type.tp_new( &SShape_Type, 0, 0 );
+ ((BPy_SShape *) py_ss)->ss = new SShape( ss );
+
+ return py_ss;
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h
index 16f991e0e51..6bf05dc8047 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.h
+++ b/source/blender/freestyle/intern/python/BPy_Convert.h
@@ -4,12 +4,17 @@
#include "../geometry/Geom.h"
using namespace Geometry;
+
+#include "BPy_BBox.h"
#include "BPy_Id.h"
#include "BPy_IntegrationType.h"
#include "BPy_Interface0D.h"
#include "Interface0D/CurvePoint/BPy_StrokeVertex.h"
#include "Interface0D/BPy_SVertex.h"
+#include "Interface0D/BPy_ViewVertex.h"
#include "Interface1D/BPy_FEdge.h"
+#include "Interface1D/BPy_ViewEdge.h"
+#include "BPy_SShape.h"
#include "BPy_Nature.h"
#include "BPy_MediumType.h"
#include "BPy_StrokeAttribute.h"
@@ -31,14 +36,18 @@ PyObject * Vector_from_Vec2f( Vec2f& v );
PyObject * Vector_from_Vec3f( Vec3f& v );
PyObject * Vector_from_Vec3r( Vec3r& v );
+PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb );
PyObject * BPy_FEdge_from_FEdge( FEdge& fe );
PyObject * BPy_Id_from_Id( Id& id );
PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D );
PyObject * BPy_Nature_from_Nature( unsigned short n );
PyObject * BPy_MediumType_from_MediumType( int n );
+PyObject * BPy_SShape_from_SShape( SShape& ss );
PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa );
PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv );
PyObject * BPy_SVertex_from_SVertex( SVertex& sv );
+PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv );
+PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve );
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index a6ef92d8f51..0496060d0f3 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -1,5 +1,6 @@
#include "BPy_Freestyle.h"
+#include "BPy_BBox.h"
#include "BPy_BinaryPredicate0D.h"
#include "BPy_BinaryPredicate1D.h"
#include "BPy_Id.h"
@@ -10,12 +11,15 @@
#include "BPy_Interface1D.h"
#include "BPy_MediumType.h"
#include "BPy_Nature.h"
+#include "BPy_SShape.h"
#include "BPy_StrokeAttribute.h"
#include "BPy_StrokeShader.h"
#include "BPy_UnaryFunction0D.h"
#include "BPy_UnaryFunction1D.h"
#include "BPy_UnaryPredicate0D.h"
#include "BPy_UnaryPredicate1D.h"
+#include "BPy_ViewShape.h"
+
#ifdef __cplusplus
extern "C" {
@@ -137,6 +141,7 @@ PyObject *Freestyle_Init( void )
MediumType_Init( module );
Nature_Init( module );
+ BBox_Init( module );
BinaryPredicate0D_Init( module );
BinaryPredicate1D_Init( module );
Id_Init( module );
@@ -144,12 +149,14 @@ PyObject *Freestyle_Init( void )
Interface0D_Init( module );
Interface1D_Init( module );
Iterator_Init( module );
+ SShape_Init( module );
StrokeAttribute_Init( module );
StrokeShader_Init( module );
UnaryFunction0D_Init( module );
UnaryFunction1D_Init( module );
UnaryPredicate0D_Init( module );
UnaryPredicate1D_Init( module );
+ ViewShape_Init( module );
return module;
}
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 113fc3f1cf7..ec881b010ee 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -3,6 +3,7 @@
#include "BPy_Convert.h"
#include "Interface1D/BPy_FEdge.h"
#include "Interface1D/BPy_Stroke.h"
+#include "Interface1D/BPy_ViewEdge.h"
#include "BPy_MediumType.h"
#ifdef __cplusplus
@@ -150,6 +151,11 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module )
tmp = BPy_MediumType_from_MediumType( Stroke::HUMID_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "HUMID_MEDIUM", tmp); Py_DECREF(tmp);
tmp = BPy_MediumType_from_MediumType( Stroke::OPAQUE_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "OPAQUE_MEDIUM", tmp); Py_DECREF(tmp);
+ if( PyType_Ready( &ViewEdge_Type ) < 0 )
+ return;
+ Py_INCREF( &ViewEdge_Type );
+ PyModule_AddObject(module, "ViewEdge", (PyObject *)&ViewEdge_Type);
+
}
diff --git a/source/blender/freestyle/intern/python/BPy_Material.h b/source/blender/freestyle/intern/python/BPy_Material.h
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_Material.h
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index a5b1cf3f27a..62c554aab51 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -1,120 +1,277 @@
- PyObject *_wrap_SShape_userdata_set(PyObject *self , PyObject *args) {
+#include "BPy_SShape.h"
+
+#include "BPy_Convert.h"
+#include "Interface0D/BPy_SVertex.h"
+#include "Interface1D/BPy_FEdge.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for SShape instance -----------*/
+static int SShape___init__(BPy_SShape *self, PyObject *args, PyObject *kwds);
+static void SShape___dealloc__(BPy_SShape *self);
+static PyObject * SShape___repr__(BPy_SShape* self);
+
+static PyObject * SShape_AddEdge( BPy_SShape *self , PyObject *args);
+static PyObject * SShape_AddNewVertex( BPy_SShape *self , PyObject *args);
+static PyObject * SShape_setBBox( BPy_SShape *self , PyObject *args);
+static PyObject * SShape_ComputeBBox( BPy_SShape *self );
+static PyObject * SShape_bbox( BPy_SShape *self );
+static PyObject * SShape_getVertexList( BPy_SShape *self );
+static PyObject * SShape_getEdgeList( BPy_SShape *self );
+static PyObject * SShape_getId( BPy_SShape *self );
+static PyObject * SShape_setId( BPy_SShape *self , PyObject *args);
+
+/*----------------------SShape instance definitions ----------------------------*/
+static PyMethodDef BPy_SShape_methods[] = {
+ {"AddEdge", ( PyCFunction ) SShape_AddEdge, METH_VARARGS, "(FEdge fe )Adds a FEdge to the list of FEdges. "},
+ {"AddNewVertex", ( PyCFunction ) SShape_AddNewVertex, METH_VARARGS, "(SVertex sv )Adds a SVertex to the list of SVertex of this Shape. The SShape attribute of the SVertex is also set to 'this'."},
+ {"setBBox", ( PyCFunction ) SShape_setBBox, METH_VARARGS, "(BBox bb )Sets the Bounding Box of the Shape"},
+ {"ComputeBBox", ( PyCFunction ) SShape_ComputeBBox, METH_NOARGS, "( )Compute the bbox of the SShape"},
+ {"bbox", ( PyCFunction ) SShape_bbox, METH_NOARGS, "( )Returns the bounding box of the shape."},
+ {"getVertexList", ( PyCFunction ) SShape_getVertexList, METH_NOARGS, "( )Returns the list of SVertex of the Shape"},
+ {"getEdgeList", ( PyCFunction ) SShape_getEdgeList, METH_NOARGS, "( )Returns the list of FEdges of the Shape."},
+ {"getId", ( PyCFunction ) SShape_getId, METH_NOARGS, "( )Returns the Id of the Shape. "},
+ {"setId", ( PyCFunction ) SShape_setId, METH_VARARGS, "(Id id )Sets the Id of the shape. "},
+
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_SShape type definition ------------------------------*/
+
+PyTypeObject SShape_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "SShape", /* tp_name */
+ sizeof( BPy_SShape ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ (destructor)SShape___dealloc__, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ (reprfunc)SShape___repr__, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_SShape_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ NULL, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)SShape___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ PyType_GenericNew, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+PyMODINIT_FUNC SShape_Init( PyObject *module )
+{
+ if( module == NULL )
+ return;
+
+ if( PyType_Ready( &SShape_Type ) < 0 )
+ return;
+
+ Py_INCREF( &SShape_Type );
+ PyModule_AddObject(module, "SShape", (PyObject *)&SShape_Type);
}
+//------------------------INSTANCE METHODS ----------------------------------
- PyObject *_wrap_SShape_userdata_get(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_SShape__SWIG_0(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_SShape__SWIG_1(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) {
-}
-
-
- PyObject *_wrap_SShape_dupplicate(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_delete_SShape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_SShape_AddEdge(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_SShape_AddNewVertex(PyObject *self , PyObject *args) {
-}
+int SShape___init__(BPy_SShape *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *obj;
+ if (! PyArg_ParseTuple(args, "|O", &obj) )
+ return -1;
- PyObject *_wrap_SShape_AddChain(PyObject *self , PyObject *args) {
+ if( !obj ) {
+ self->ss = new SShape();
+
+ } else if( BPy_SShape_Check(obj) ) {
+ self->ss = new SShape(*( ((BPy_SShape *) obj)->ss ));
+ }
+
+ return 0;
}
-
- PyObject *_wrap_SShape_CreateSVertex(PyObject *self , PyObject *args) {
+void SShape___dealloc__(BPy_SShape *self)
+{
+ delete self->ss;
+ self->ob_type->tp_free((PyObject*)self);
}
-
- PyObject *_wrap_SShape_SplitEdge(PyObject *self , PyObject *args) {
+PyObject * SShape___repr__(BPy_SShape *self)
+{
+ return PyString_FromFormat("SShape - address: %p", self->ss );
}
+PyObject * SShape_AddEdge( BPy_SShape *self , PyObject *args) {
+ PyObject *py_fe = 0;
- PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *self , PyObject *args) {
-}
-
+ if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) {
+ cout << "ERROR: SShape_AddEdge" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->ss->AddEdge( ((BPy_FEdge *) py_fe)->fe );
- PyObject *_wrap_SShape_SetBBox(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+PyObject * SShape_AddNewVertex( BPy_SShape *self , PyObject *args) {
+ PyObject *py_sv = 0;
- PyObject *_wrap_SShape_ComputeBBox(PyObject *self , PyObject *args) {
-}
+ if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) {
+ cout << "ERROR: SShape_AddNewVertex" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->ss->AddNewVertex( ((BPy_SVertex *) py_sv)->sv );
-
- PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+PyObject * SShape_setBBox( BPy_SShape *self , PyObject *args) {
+ PyObject *py_bb = 0;
- PyObject *_wrap_SShape_RemoveEdge(PyObject *self , PyObject *args) {
-}
-
+ if(!( PyArg_ParseTuple(args, "O", &py_bb) && BPy_BBox_Check(py_bb) )) {
+ cout << "ERROR: SShape_SetBBox" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->ss->setBBox(*( ((BPy_BBox*) py_bb)->bb ));
- PyObject *_wrap_SShape_GetVertexList(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+PyObject * SShape_ComputeBBox( BPy_SShape *self ) {
+ self->ss->ComputeBBox();
- PyObject *_wrap_SShape_GetEdgeList(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
-
- PyObject *_wrap_SShape_GetChains(PyObject *self , PyObject *args) {
+PyObject * SShape_bbox( BPy_SShape *self ) {
+ BBox<Vec3r> bb( self->ss->bbox() );
+ return BPy_BBox_from_BBox( bb );
}
- PyObject *_wrap_SShape_bbox(PyObject *self , PyObject *args) {
-}
+PyObject * SShape_getVertexList( BPy_SShape *self ) {
+ PyObject *py_vertices = PyList_New(NULL);
-
- PyObject *_wrap_SShape_material(PyObject *self , PyObject *args) {
+ vector< SVertex * > vertices = self->ss->getVertexList();
+ vector< SVertex * >::iterator it;
+
+ for( it = vertices.begin(); it != vertices.end(); it++ ) {
+ PyList_Append( py_vertices, BPy_SVertex_from_SVertex(*( *it )) );
+ }
+
+ return py_vertices;
}
- PyObject *_wrap_SShape_materials(PyObject *self , PyObject *args) {
-}
-
+PyObject * SShape_getEdgeList( BPy_SShape *self ) {
+ PyObject *py_edges = PyList_New(NULL);
- PyObject *_wrap_SShape_viewShape(PyObject *self , PyObject *args) {
+ vector< FEdge * > edges = self->ss->getEdgeList();
+ vector< FEdge * >::iterator it;
+
+ for( it = edges.begin(); it != edges.end(); it++ ) {
+ PyList_Append( py_edges, BPy_FEdge_from_FEdge(*( *it )) );
+ }
+
+ return py_edges;
}
-
- PyObject *_wrap_SShape_importance(PyObject *self , PyObject *args) {
+PyObject * SShape_getId( BPy_SShape *self ) {
+ Id id( self->ss->getId() );
+ return BPy_Id_from_Id( id );
}
+PyObject * SShape_setId( BPy_SShape *self , PyObject *args) {
+ PyObject *py_id;
- PyObject *_wrap_SShape_getId(PyObject *self , PyObject *args) {
-}
+ if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) {
+ cout << "ERROR: SShape_setId" << endl;
+ Py_RETURN_NONE;
+ }
+ self->ss->setId(*( ((BPy_Id *) py_id)->id ));
- PyObject *_wrap_SShape_SetId(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
- PyObject *_wrap_SShape_SetMaterials(PyObject *self , PyObject *args) {
-}
-
+// const Material & material (unsigned i) const
+// const vector< Material > & materials () const
+// void SetMaterials (const vector< Material > &iMaterials)
- PyObject *_wrap_SShape_SetViewShape(PyObject *self , PyObject *args) {
-}
+///////////////////////////////////////////////////////////////////////////////////////////
- PyObject *_wrap_SShape_SetImportance(PyObject *self , PyObject *args) {
+#ifdef __cplusplus
}
-
-
+#endif \ No newline at end of file
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.h b/source/blender/freestyle/intern/python/BPy_SShape.h
new file mode 100644
index 00000000000..2064b6c4b64
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_SShape.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_SSHAPE_H
+#define FREESTYLE_PYTHON_SSHAPE_H
+
+#include "../view_map/Silhouette.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject SShape_Type;
+
+#define BPy_SShape_Check(v) (( (PyObject *) v)->ob_type == &SShape_Type)
+
+/*---------------------------Python BPy_SShape structure definition----------*/
+typedef struct {
+ PyObject_HEAD
+ SShape *ss;
+} BPy_SShape;
+
+/*---------------------------Python BPy_SShape visible prototypes-----------*/
+
+PyMODINIT_FUNC SShape_Init( PyObject *module );
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_SSHAPE_H */
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index 023ce06f44f..3ac2c02a274 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -1,88 +1,291 @@
- PyObject *_wrap_ViewShape_userdata_set(PyObject *self , PyObject *args) {
+#include "BPy_ViewShape.h"
+
+#include "BPy_Convert.h"
+#include "Interface0D/BPy_ViewVertex.h"
+#include "Interface1D/BPy_ViewEdge.h"
+#include "BPy_SShape.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for ViewShape instance -----------*/
+static int ViewShape___init__(BPy_ViewShape *self, PyObject *args, PyObject *kwds);
+static void ViewShape___dealloc__(BPy_ViewShape *self);
+static PyObject * ViewShape___repr__(BPy_ViewShape* self);
+
+
+/*---------------------- BPy_ViewShape instance definitions ----------------------------*/
+static PyMethodDef BPy_ViewShape_methods[] = {
+ //{"AddEdge", ( PyCFunction ) ViewShape_AddEdge, METH_VARARGS, "(FEdge fe )Adds a FEdge to the list of FEdges. "},
+
+
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_ViewShape type definition ------------------------------*/
+
+PyTypeObject ViewShape_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "ViewShape", /* tp_name */
+ sizeof( BPy_ViewShape ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ (destructor)ViewShape___dealloc__, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ (reprfunc)ViewShape___repr__, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_ViewShape_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ NULL, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)ViewShape___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ PyType_GenericNew, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+PyMODINIT_FUNC ViewShape_Init( PyObject *module )
+{
+ if( module == NULL )
+ return;
+
+ if( PyType_Ready( &ViewShape_Type ) < 0 )
+ return;
+
+ Py_INCREF( &ViewShape_Type );
+ PyModule_AddObject(module, "ViewShape", (PyObject *)&ViewShape_Type);
}
-
- PyObject *_wrap_ViewShape_userdata_get(PyObject *self , PyObject *args) {
+//------------------------INSTANCE METHODS ----------------------------------
+
+int ViewShape___init__(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *obj;
+
+ if (! PyArg_ParseTuple(args, "|O", &obj) )
+ return -1;
+
+ if( !obj ) {
+ self->vs = new ViewShape();
+
+ } else if( BPy_ViewShape_Check(obj) ) {
+ self->vs = new ViewShape( ((BPy_SShape *) obj)->ss );
+
+ } else if( BPy_ViewShape_Check(obj) ) {
+ self->vs = new ViewShape(*( ((BPy_ViewShape *) obj)->vs ));
+ }
+
+ return 0;
}
-
- PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *self , PyObject *args) {
+void ViewShape___dealloc__(BPy_ViewShape *self)
+{
+ delete self->vs;
+ self->ob_type->tp_free((PyObject*)self);
}
-
- PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *self , PyObject *args) {
+PyObject * ViewShape___repr__(BPy_ViewShape *self)
+{
+ return PyString_FromFormat("ViewShape - address: %p", self->vs );
}
-
- PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *self , PyObject *args) {
+PyObject * ViewShape_sshape( BPy_ViewShape *self ) {
+ SShape ss(*( self->vs->sshape() ));
+ return BPy_SShape_from_SShape( ss );
}
- PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) {
-}
-
+PyObject * ViewShape_vertices( BPy_ViewShape *self ) {
+ PyObject *py_vertices = PyList_New(NULL);
- PyObject *_wrap_ViewShape_dupplicate(PyObject *self , PyObject *args) {
+ vector< ViewVertex * > vertices = self->vs->vertices();
+ vector< ViewVertex * >::iterator it;
+
+ for( it = vertices.begin(); it != vertices.end(); it++ ) {
+ PyList_Append( py_vertices, BPy_ViewVertex_from_ViewVertex_ptr( *it ) );
+ }
+
+ return py_vertices;
}
- PyObject *_wrap_delete_ViewShape(PyObject *self , PyObject *args) {
-}
-
+PyObject * ViewShape_edges( BPy_ViewShape *self ) {
+ PyObject *py_edges = PyList_New(NULL);
- PyObject *_wrap_ViewShape_SplitEdge(PyObject *self , PyObject *args) {
+ vector< ViewEdge * > edges = self->vs->edges();
+ vector< ViewEdge * >::iterator it;
+
+ for( it = edges.begin(); it != edges.end(); it++ ) {
+ PyList_Append( py_edges, BPy_ViewEdge_from_ViewEdge(*( *it )) );
+ }
+
+ return py_edges;
}
-
- PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *self , PyObject *args) {
+PyObject * ViewShape_getId( BPy_ViewShape *self ) {
+ Id id( self->vs->getId() );
+ return BPy_Id_from_Id( id );
}
+PyObject * ViewShape_setSShape( BPy_ViewShape *self , PyObject *args) {
+ PyObject *py_ss = 0;
- PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *self , PyObject *args) {
-}
-
+ if(!( PyArg_ParseTuple(args, "O", &py_ss) && BPy_SShape_Check(py_ss) )) {
+ cout << "ERROR: ViewShape_SetSShape" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->vs->setSShape( ((BPy_SShape *) py_ss)->ss );
- PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) {
+ Py_RETURN_NONE;
}
-
- PyObject *_wrap_ViewShape_vertices(PyObject *self , PyObject *args) {
+PyObject * ViewShape_setVertices( BPy_ViewShape *self , PyObject *args) {
+ PyObject *list = 0;
+ PyObject *tmp;
+
+ if(!( PyArg_ParseTuple(args, "O", &list) && PyList_Check(list) )) {
+ cout << "ERROR: ViewShape_SetVertices" << endl;
+ Py_RETURN_NONE;
+ }
+
+ vector< ViewVertex *> v;
+
+ for( int i=0; i < PyList_Size(list); i++ ) {
+ tmp = PyList_GetItem(list, i);
+ if( BPy_ViewVertex_Check(tmp) )
+ v.push_back( ((BPy_ViewVertex *) tmp)->vv );
+ else
+ Py_RETURN_NONE;
+ }
+
+ self->vs->setVertices( v );
+
+ Py_RETURN_NONE;
}
+//void SetEdges (const vector< ViewEdge * > &iEdges)
+PyObject * ViewShape_setEdges( BPy_ViewShape *self , PyObject *args) {
+ PyObject *list = 0;
+ PyObject *tmp;
- PyObject *_wrap_ViewShape_edges(PyObject *self , PyObject *args) {
-}
+ if(!( PyArg_ParseTuple(args, "O", &list) && PyList_Check(list) )) {
+ cout << "ERROR: ViewShape_SetVertices" << endl;
+ Py_RETURN_NONE;
+ }
+ vector<ViewEdge *> v;
- PyObject *_wrap_ViewShape_getId(PyObject *self , PyObject *args) {
-}
+ for( int i=0; i < PyList_Size(list); i++ ) {
+ tmp = PyList_GetItem(list, i);
+ if( BPy_ViewEdge_Check(tmp) )
+ v.push_back( ((BPy_ViewEdge *) tmp)->ve );
+ else
+ Py_RETURN_NONE;
+ }
+ self->vs->setEdges( v );
- PyObject *_wrap_ViewShape_SetSShape(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+PyObject * ViewShape_AddEdge( BPy_ViewShape *self , PyObject *args) {
+ PyObject *py_ve = 0;
- PyObject *_wrap_ViewShape_SetVertices(PyObject *self , PyObject *args) {
-}
-
+ if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) {
+ cout << "ERROR: ViewShape_AddEdge" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->vs->AddEdge( ((BPy_ViewEdge *) py_ve)->ve );
- PyObject *_wrap_ViewShape_SetEdges(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+PyObject * ViewShape_AddVertex( BPy_ViewShape *self , PyObject *args) {
+ PyObject *py_vv = 0;
- PyObject *_wrap_ViewShape_AddVertex(PyObject *self , PyObject *args) {
-}
+ if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) {
+ cout << "ERROR: ViewShape_AddNewVertex" << endl;
+ Py_RETURN_NONE;
+ }
+
+ self->vs->AddVertex( ((BPy_ViewVertex *) py_vv)->vv );
-
- PyObject *_wrap_ViewShape_AddEdge(PyObject *self , PyObject *args) {
+ Py_RETURN_NONE;
}
+// virtual ViewShape * dupplicate ()
- PyObject *_wrap_ViewShape_RemoveEdge(PyObject *self , PyObject *args) {
-}
-
+///////////////////////////////////////////////////////////////////////////////////////////
- PyObject *_wrap_ViewShape_RemoveVertex(PyObject *self , PyObject *args) {
+#ifdef __cplusplus
}
-
-
+#endif \ No newline at end of file
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.h b/source/blender/freestyle/intern/python/BPy_ViewShape.h
new file mode 100644
index 00000000000..20490cd71aa
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_VIEWSHAPE_H
+#define FREESTYLE_PYTHON_VIEWSHAPE_H
+
+#include "../view_map/ViewMap.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject ViewShape_Type;
+
+#define BPy_ViewShape_Check(v) (( (PyObject *) v)->ob_type == &ViewShape_Type)
+
+/*---------------------------Python BPy_ViewShape structure definition----------*/
+typedef struct {
+ PyObject_HEAD
+ ViewShape *vs;
+} BPy_ViewShape;
+
+/*---------------------------Python BPy_ViewShape visible prototypes-----------*/
+
+PyMODINIT_FUNC ViewShape_Init( PyObject *module );
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_VIEWSHAPE_H */
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
index 841040af180..592a46186c2 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h
@@ -4,7 +4,6 @@
#include "../../view_map/ViewMap.h"
#include "../BPy_Interface0D.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 1b55b601c89..02d06757fcb 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -1,236 +1,317 @@
- PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_getId(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_getNature(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_userdata_set(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_userdata_get(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) {
-}
-
-
- PyObject *_wrap_delete_ViewEdge(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_A(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_B(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_fedgeA(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_fedgeB(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_viewShape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_isClosed(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_bShape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluders(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_splittingId(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetA(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetB(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetNature(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetShape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetId(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetaShape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_SetQI(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_AddOccluder(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_setSplittingId(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_getLength2D(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_qi(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluders_begin(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluders_end(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluders_size(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluders_empty(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occludee(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occluded_shape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_occludee_empty(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_shape_id(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_shape(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_shape_importance(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_verticesBegin(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_verticesEnd(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *self , PyObject *args) {
-}
-
-
- PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) {
-}
-
-
+#include "BPy_ViewEdge.h"
+
+#include "../BPy_Convert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for ViewEdge instance -----------*/
+static int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds);
+
+static PyObject * ViewEdge_A( BPy_ViewEdge *self );
+static PyObject * ViewEdge_B( BPy_ViewEdge *self );
+
+
+/*----------------------ViewEdge instance definitions ----------------------------*/
+static PyMethodDef BPy_ViewEdge_methods[] = {
+
+ {"A", ( PyCFunction ) ViewEdge_A, METH_NOARGS, "() Returns the first ViewVertex."},
+ {"B", ( PyCFunction ) ViewEdge_B, METH_NOARGS, "() Returns the second ViewVertex."},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_ViewEdge type definition ------------------------------*/
+
+PyTypeObject ViewEdge_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "ViewEdge", /* tp_name */
+ sizeof( BPy_ViewEdge ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_ViewEdge_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Interface1D_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)ViewEdge___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds)
+{
+ self->ve = new ViewEdge();
+ self->py_if1D.if1D = self->ve;
+
+ return 0;
+}
+
+
+PyObject * ViewEdge_A( BPy_ViewEdge *self ) {
+ // if( self->ve->A() ){
+ // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() );
+ // }
+ //
+ Py_RETURN_NONE;
+}
+
+PyObject * ViewEdge_B( BPy_ViewEdge *self ) {
+ // if( self->ve->B() ){
+ // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() );
+ // }
+
+ Py_RETURN_NONE;
+}
+
+//
+// PyObject * ViewEdge___getitem__( BPy_ViewEdge *self, PyObject *args ) {
+// int i;
+//
+// if(!( PyArg_ParseTuple(args, "i", &i) && (i == 0 || i == 1) )) {
+// cout << "ERROR: ViewEdge___getitem__" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// if( SVertex *v = self->ve->operator[](i) )
+// return BPy_SVertex_from_SVertex( *v );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject * ViewEdge_nextEdge( BPy_ViewEdge *self ) {
+// if( ViewEdge *fe = self->ve->nextEdge() )
+// return BPy_ViewEdge_from_ViewEdge( *fe );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject * ViewEdge_previousEdge( BPy_ViewEdge *self ) {
+// if( ViewEdge *fe = self->ve->previousEdge() )
+// return BPy_ViewEdge_from_ViewEdge( *fe );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject * ViewEdge_isSmooth( BPy_ViewEdge *self ) {
+// return PyBool_from_bool( self->ve->isSmooth() );
+// }
+//
+// PyObject *ViewEdge_setVertexA( BPy_ViewEdge *self , PyObject *args) {
+// PyObject *py_sv;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) {
+// cout << "ERROR: ViewEdge_setVertexA" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setVertexA( ((BPy_SVertex *) py_sv)->sv );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *ViewEdge_setVertexB( BPy_ViewEdge *self , PyObject *args) {
+// PyObject *py_sv;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) {
+// cout << "ERROR: ViewEdge_setVertexB" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setVertexB( ((BPy_SVertex *) py_sv)->sv );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *ViewEdge_setId( BPy_ViewEdge *self , PyObject *args) {
+// PyObject *py_id;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) {
+// cout << "ERROR: ViewEdge_setId" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setId(*( ((BPy_Id *) py_id)->id ));
+//
+// Py_RETURN_NONE;
+// }
+//
+//
+// PyObject *ViewEdge_setNextEdge( BPy_ViewEdge *self , PyObject *args) {
+// PyObject *py_fe;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) {
+// cout << "ERROR: ViewEdge_setNextEdge" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setNextEdge( ((BPy_ViewEdge *) py_fe)->ve );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *ViewEdge_setPreviousEdge( BPy_ViewEdge *self , PyObject *args) {
+// PyObject *py_fe;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) {
+// cout << "ERROR: ViewEdge_setPreviousEdge" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setPreviousEdge( ((BPy_ViewEdge *) py_fe)->ve );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *ViewEdge_setSmooth( BPy_ViewEdge *self , PyObject *args) {
+// int b;
+//
+// if(!( PyArg_ParseTuple(args, "i", &b) )) {
+// cout << "ERROR: ViewEdge_setSmooth" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// self->ve->setSmooth( (bool) b );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) {
+// PyObject *py_n;
+//
+// if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) {
+// cout << "ERROR: ViewEdge_setNature" << endl;
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i );
+// ((ViewEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) );
+//
+// Py_RETURN_NONE;
+// }
+//
+// PyObject *ViewEdge_getVertices( BPy_ViewEdge *self ) {
+// PyObject *py_vertices = PyList_New(NULL);
+//
+// for( Interface0DIterator it = self->ve->verticesBegin(); it != self->ve->verticesEnd(); it++ ) {
+// PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) );
+// }
+//
+// return py_vertices;
+// }
+//
+// PyObject *ViewEdge_getPoints( BPy_ViewEdge *self ) {
+// PyObject *py_points = PyList_New(NULL);
+//
+// for( Interface0DIterator it = self->ve->pointsBegin(); it != self->ve->pointsEnd(); it++ ) {
+// PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) );
+// }
+//
+// return py_points;
+// }
+//
+//
+//
+//
+//
+// FEdge * fedgeA ()
+// FEdge * fedgeB ()
+// ViewShape * viewShape ()
+// ViewShape * aShape ()
+// bool isClosed ()
+// unsigned getChainingTimeStamp ()
+// void SetA (ViewVertex *iA)
+// void SetB (ViewVertex *iB)
+// void SetNature (Nature::EdgeNature iNature)
+// void SetFEdgeA (FEdge *iFEdge)
+// void SetFEdgeB (FEdge *iFEdge)
+// void SetShape (ViewShape *iVShape)
+// void SetId (const Id &id)
+// void UpdateFEdges ()
+// void SetaShape (ViewShape *iShape)
+// void SetQI (int qi)
+// void setChainingTimeStamp (unsigned ts)
+// real getLength2D () const
+// virtual Interface0DIterator verticesBegin ()
+// virtual Interface0DIterator verticesEnd ()
+// virtual Interface0DIterator pointsBegin (float t=0.f)
+// virtual Interface0DIterator pointsEnd (float t=0.f)
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h
new file mode 100644
index 00000000000..a7e7455b764
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h
@@ -0,0 +1,32 @@
+#ifndef FREESTYLE_PYTHON_VIEWEDGE_H
+#define FREESTYLE_PYTHON_VIEWEDGE_H
+
+#include "../../view_map/ViewMap.h"
+
+#include "../BPy_Interface1D.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject ViewEdge_Type;
+
+#define BPy_ViewEdge_Check(v) (( (PyObject *) v)->ob_type == &ViewEdge_Type)
+
+/*---------------------------Python BPy_ViewEdge structure definition----------*/
+typedef struct {
+ BPy_Interface1D py_if1D;
+ ViewEdge *ve;
+} BPy_ViewEdge;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_VIEWEDGE_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index b1b33b347bc..72273e73a65 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -1,6 +1,5 @@
#include "BPy_CurvePointIterator.h"
-#include "../BPy_Convert.h"
#include "BPy_Interface0DIterator.h"
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index b2b6d67aa0f..c88ba7773ab 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -1,7 +1,5 @@
#include "BPy_Interface0DIterator.h"
-#include "../BPy_Convert.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index da8b1453102..be1f946302f 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -1,6 +1,5 @@
#include "BPy_SVertexIterator.h"
-#include "../BPy_Convert.h"
#include "../Interface0D/BPy_SVertex.h"
#include "../Interface1D/BPy_FEdge.h"
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index 895aaee2323..72e41a37301 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -1,6 +1,5 @@
#include "BPy_StrokeVertexIterator.h"
-#include "../BPy_Convert.h"
#include "BPy_Interface0DIterator.h"
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index 25ae25d52a9..e5de7769fbb 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -1,6 +1,7 @@
#include "BPy_ViewEdgeIterator.h"
#include "../BPy_Convert.h"
+#include "../Interface1D/BPy_ViewEdge.h"
#ifdef __cplusplus
extern "C" {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index 9a32f384be9..0622481f412 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -1,7 +1,5 @@
#include "BPy_orientedViewEdgeIterator.h"
-#include "../BPy_Convert.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h
index 121f1c8ba54..b01c895d89a 100755
--- a/source/blender/freestyle/intern/stroke/ChainingIterators.h
+++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h
@@ -42,7 +42,7 @@
// Adjacency iterator used in the chaining process
//
///////////////////////////////////////////////////////////
-class LIB_STROKE_EXPORT AdjacencyIterator : Iterator {
+class LIB_STROKE_EXPORT AdjacencyIterator : public Iterator {
protected:
ViewVertexInternal::orientedViewEdgeIterator _internalIterator;
bool _restrictToSelection;
@@ -73,6 +73,10 @@ public:
virtual ~AdjacencyIterator(){
}
+ virtual string getExactTypeName() const {
+ return "AdjacencyIterator";
+ }
+
virtual inline bool isEnd(){
return _internalIterator.isEnd();
}
@@ -98,6 +102,10 @@ public:
}
virtual void increment();
+ virtual void decrement(){
+ cerr << "Warning: method decrement() not implemented" << endl;
+ }
+
protected:
bool isValid(ViewEdge* edge);
};
diff --git a/source/blender/freestyle/intern/stroke/CurveIterators.h b/source/blender/freestyle/intern/stroke/CurveIterators.h
index 92f8bf065f4..2ba77a3c478 100755
--- a/source/blender/freestyle/intern/stroke/CurveIterators.h
+++ b/source/blender/freestyle/intern/stroke/CurveIterators.h
@@ -134,7 +134,7 @@ namespace CurveInternal {
return new CurvePointIterator(*this);
}
- inline Interface0DIterator CastToInterface0DIterator() const{
+ inline Interface0DIterator castToInterface0DIterator() const{
Interface0DIterator ret(new CurveInternal::CurvePointIterator(*this));
return ret;
}
@@ -183,7 +183,9 @@ namespace CurveInternal {
return true;
return false;
}
- protected:
+
+// protected:
+
virtual void increment()
{
if((_currentn == _n-1) && (_t == 1.f))
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index cfdd72ac839..fe1ac27b04e 100755
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -464,14 +464,14 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredica
CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling);
CurveInternal::CurvePointIterator it = second;
CurveInternal::CurvePointIterator split = second;
- Interface0DIterator it0d = it.CastToInterface0DIterator();
+ Interface0DIterator it0d = it.castToInterface0DIterator();
real _min = FLT_MAX;++it;//func(it0d);++it;
CurveInternal::CurvePointIterator next = it;++next;
real tmp;
bool bsplit = false;
for(; ((it != end) && (next != end)); ++it,++next){
- it0d = it.CastToInterface0DIterator();
+ it0d = it.castToInterface0DIterator();
tmp = func(it0d);
if(tmp < _min){
_min = tmp;
@@ -600,7 +600,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredica
CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling);
CurveInternal::CurvePointIterator it = second;
CurveInternal::CurvePointIterator split = second;
- Interface0DIterator it0d = it.CastToInterface0DIterator();
+ Interface0DIterator it0d = it.castToInterface0DIterator();
//real _min = func(it0d);++it;
real _min = FLT_MAX;++it;
real mean = 0.f;
@@ -612,7 +612,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredica
bool bsplit = false;
for(; ((it != end) && (next != end)); ++it,++next){
++count;
- it0d = it.CastToInterface0DIterator();
+ it0d = it.castToInterface0DIterator();
if(!pred0d(it0d))
continue;
tmp = func(it0d);
diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp
index 14c3dbb57be..67672d3a2ac 100755
--- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp
+++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp
@@ -37821,7 +37821,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_SShape_getVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SShape *arg1 = (SShape *) 0 ;
std::vector< SVertex * > *result = 0 ;
@@ -37829,16 +37829,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self),
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetVertexList",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:SShape_getVertexList",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetVertexList" "', argument " "1"" of type '" "SShape *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getVertexList" "', argument " "1"" of type '" "SShape *""'");
}
arg1 = reinterpret_cast< SShape * >(argp1);
{
try {
{
- std::vector< SVertex * > &_result_ref = (arg1)->GetVertexList();
+ std::vector< SVertex * > &_result_ref = (arg1)->getVertexList();
result = (std::vector< SVertex * > *) &_result_ref;
}
}
@@ -37856,7 +37856,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_SShape_getEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SShape *arg1 = (SShape *) 0 ;
std::vector< FEdge * > *result = 0 ;
@@ -37864,16 +37864,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetEdgeList",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:SShape_getEdgeList",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetEdgeList" "', argument " "1"" of type '" "SShape *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getEdgeList" "', argument " "1"" of type '" "SShape *""'");
}
arg1 = reinterpret_cast< SShape * >(argp1);
{
try {
{
- std::vector< FEdge * > &_result_ref = (arg1)->GetEdgeList();
+ std::vector< FEdge * > &_result_ref = (arg1)->getEdgeList();
result = (std::vector< FEdge * > *) &_result_ref;
}
}
@@ -37891,7 +37891,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_SShape_getChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
SShape *arg1 = (SShape *) 0 ;
std::vector< FEdge * > *result = 0 ;
@@ -37899,16 +37899,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetChains",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:SShape_getChains",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetChains" "', argument " "1"" of type '" "SShape *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getChains" "', argument " "1"" of type '" "SShape *""'");
}
arg1 = reinterpret_cast< SShape * >(argp1);
{
try {
{
- std::vector< FEdge * > &_result_ref = (arg1)->GetChains();
+ std::vector< FEdge * > &_result_ref = (arg1)->getChains();
result = (std::vector< FEdge * > *) &_result_ref;
}
}
@@ -52210,6 +52210,41 @@ fail:
}
+SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ViewEdge *arg1 = 0 ;
+ ViewEdge *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdge",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewEdge, 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewEdge &""'");
+ }
+ if (!argp1) {
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewEdge &""'");
+ }
+ arg1 = reinterpret_cast< ViewEdge * >(argp1);
+ {
+ try {
+ result = (ViewEdge *)new ViewEdge(*arg1);
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[6];
@@ -52223,6 +52258,15 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) {
if (argc == 0) {
return _wrap_new_ViewEdge__SWIG_0(self, args);
}
+ if (argc == 1) {
+ int _v;
+ void *vptr = 0;
+ int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0);
+ _v = SWIG_CheckState(res);
+ if (_v) {
+ return _wrap_new_ViewEdge__SWIG_4(self, args);
+ }
+ }
if (argc == 2) {
int _v;
void *vptr = 0;
@@ -52292,7 +52336,40 @@ fail:
" ViewEdge()\n"
" ViewEdge(ViewVertex *,ViewVertex *)\n"
" ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n"
- " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n");
+ " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"
+ " ViewEdge(ViewEdge &)\n");
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_ViewEdge_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ViewEdge *arg1 = (ViewEdge *) 0 ;
+ ViewEdge *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_duplicate",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_duplicate" "', argument " "1"" of type '" "ViewEdge *""'");
+ }
+ arg1 = reinterpret_cast< ViewEdge * >(argp1);
+ {
+ try {
+ result = (ViewEdge *)(arg1)->duplicate();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 );
+ return resultobj;
+fail:
return NULL;
}
@@ -59225,6 +59302,38 @@ fail:
}
+SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ;
+ ViewEdge *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_duplicate",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_duplicate" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'");
+ }
+ arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1);
+ {
+ try {
+ result = (ViewEdge *)(*arg1)->duplicate();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ;
@@ -75335,6 +75444,38 @@ fail:
}
+SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ;
+ std::string result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getExactTypeName",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getExactTypeName" "', argument " "1"" of type '" "AdjacencyIterator const *""'");
+ }
+ arg1 = reinterpret_cast< AdjacencyIterator * >(argp1);
+ {
+ try {
+ result = ((AdjacencyIterator const *)arg1)->getExactTypeName();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_From_std_string(static_cast< std::string >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_AdjacencyIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ;
@@ -75526,23 +75667,22 @@ fail:
}
-SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_AdjacencyIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ;
- std::string result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getExactTypeName",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_decrement",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getExactTypeName" "', argument " "1"" of type '" "AdjacencyIterator const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_decrement" "', argument " "1"" of type '" "AdjacencyIterator *""'");
}
arg1 = reinterpret_cast< AdjacencyIterator * >(argp1);
{
try {
- result = (*arg1)->getExactTypeName();
+ (arg1)->decrement();
}
// catch (Swig::DirectorTypeMismatch&) {
// cout << "Warning: return type mismatch" << endl;
@@ -75551,7 +75691,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUS
cout << "Warning: director exception catched" << endl;
}
}
- resultobj = SWIG_From_std_string(static_cast< std::string >(result));
+ resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
@@ -75673,6 +75813,38 @@ fail:
}
+SWIGINTERN PyObject *_wrap_AdjacencyIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ;
+ ViewEdge *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_duplicate",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_duplicate" "', argument " "1"" of type '" "AdjacencyIterator *""'");
+ }
+ arg1 = reinterpret_cast< AdjacencyIterator * >(argp1);
+ {
+ try {
+ result = (ViewEdge *)(*arg1)->duplicate();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_AdjacencyIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ;
@@ -84139,7 +84311,7 @@ fail:
}
-SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CurvePointIterator_castToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
Interface0DIterator result;
@@ -84147,15 +84319,15 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject
int res1 = 0 ;
PyObject * obj0 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_CastToInterface0DIterator",&obj0)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToInterface0DIterator",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 );
if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_CastToInterface0DIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'");
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToInterface0DIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'");
}
arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1);
{
try {
- result = ((CurveInternal::CurvePointIterator const *)arg1)->CastToInterface0DIterator();
+ result = ((CurveInternal::CurvePointIterator const *)arg1)->castToInterface0DIterator();
}
// catch (Swig::DirectorTypeMismatch&) {
// cout << "Warning: return type mismatch" << endl;
@@ -84378,6 +84550,132 @@ fail:
}
+SWIGINTERN PyObject *_wrap_CurvePointIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_increment",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_increment" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'");
+ }
+ arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1);
+ {
+ try {
+ (arg1)->increment();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CurvePointIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_decrement",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_decrement" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'");
+ }
+ arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1);
+ {
+ try {
+ (arg1)->decrement();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_Py_Void();
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CurvePointIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
+ float result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_t",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_t" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'");
+ }
+ arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1);
+ {
+ try {
+ result = (float)((CurveInternal::CurvePointIterator const *)arg1)->t();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_From_float(static_cast< float >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CurvePointIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
+ float result;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject * obj0 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_u",&obj0)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_u" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'");
+ }
+ arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1);
+ {
+ try {
+ result = (float)((CurveInternal::CurvePointIterator const *)arg1)->u();
+ }
+ // catch (Swig::DirectorTypeMismatch&) {
+ // cout << "Warning: return type mismatch" << endl;
+ // }
+ catch (Swig::DirectorException&) {
+ cout << "Warning: director exception catched" << endl;
+ }
+ }
+ resultobj = SWIG_From_float(static_cast< float >(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ;
@@ -107127,9 +107425,9 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"SShape_ComputeBBox", _wrap_SShape_ComputeBBox, METH_VARARGS, NULL},
{ (char *)"SShape_RemoveEdgeFromChain", _wrap_SShape_RemoveEdgeFromChain, METH_VARARGS, NULL},
{ (char *)"SShape_RemoveEdge", _wrap_SShape_RemoveEdge, METH_VARARGS, NULL},
- { (char *)"SShape_GetVertexList", _wrap_SShape_GetVertexList, METH_VARARGS, NULL},
- { (char *)"SShape_GetEdgeList", _wrap_SShape_GetEdgeList, METH_VARARGS, NULL},
- { (char *)"SShape_GetChains", _wrap_SShape_GetChains, METH_VARARGS, NULL},
+ { (char *)"SShape_getVertexList", _wrap_SShape_getVertexList, METH_VARARGS, NULL},
+ { (char *)"SShape_getEdgeList", _wrap_SShape_getEdgeList, METH_VARARGS, NULL},
+ { (char *)"SShape_getChains", _wrap_SShape_getChains, METH_VARARGS, NULL},
{ (char *)"SShape_bbox", _wrap_SShape_bbox, METH_VARARGS, NULL},
{ (char *)"SShape_material", _wrap_SShape_material, METH_VARARGS, NULL},
{ (char *)"SShape_materials", _wrap_SShape_materials, METH_VARARGS, NULL},
@@ -107416,6 +107714,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ViewEdge_userdata_set", _wrap_ViewEdge_userdata_set, METH_VARARGS, NULL},
{ (char *)"ViewEdge_userdata_get", _wrap_ViewEdge_userdata_get, METH_VARARGS, NULL},
{ (char *)"new_ViewEdge", _wrap_new_ViewEdge, METH_VARARGS, NULL},
+ { (char *)"ViewEdge_duplicate", _wrap_ViewEdge_duplicate, METH_VARARGS, NULL},
{ (char *)"delete_ViewEdge", _wrap_delete_ViewEdge, METH_VARARGS, NULL},
{ (char *)"ViewEdge_A", _wrap_ViewEdge_A, METH_VARARGS, NULL},
{ (char *)"ViewEdge_B", _wrap_ViewEdge_B, METH_VARARGS, NULL},
@@ -107582,6 +107881,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ViewEdgeViewEdgeIterator_getNature", _wrap_ViewEdgeViewEdgeIterator_getNature, METH_VARARGS, NULL},
{ (char *)"ViewEdgeViewEdgeIterator_userdata_set", _wrap_ViewEdgeViewEdgeIterator_userdata_set, METH_VARARGS, NULL},
{ (char *)"ViewEdgeViewEdgeIterator_userdata_get", _wrap_ViewEdgeViewEdgeIterator_userdata_get, METH_VARARGS, NULL},
+ { (char *)"ViewEdgeViewEdgeIterator_duplicate", _wrap_ViewEdgeViewEdgeIterator_duplicate, METH_VARARGS, NULL},
{ (char *)"ViewEdgeViewEdgeIterator_A", _wrap_ViewEdgeViewEdgeIterator_A, METH_VARARGS, NULL},
{ (char *)"ViewEdgeViewEdgeIterator_B", _wrap_ViewEdgeViewEdgeIterator_B, METH_VARARGS, NULL},
{ (char *)"ViewEdgeViewEdgeIterator_fedgeA", _wrap_ViewEdgeViewEdgeIterator_fedgeA, METH_VARARGS, NULL},
@@ -108010,17 +108310,19 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"GetSelectedFEdgeCF", _wrap_GetSelectedFEdgeCF, METH_VARARGS, NULL},
{ (char *)"new_AdjacencyIterator", _wrap_new_AdjacencyIterator, METH_VARARGS, NULL},
{ (char *)"delete_AdjacencyIterator", _wrap_delete_AdjacencyIterator, METH_VARARGS, NULL},
+ { (char *)"AdjacencyIterator_getExactTypeName", _wrap_AdjacencyIterator_getExactTypeName, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_isEnd", _wrap_AdjacencyIterator_isEnd, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_isBegin", _wrap_AdjacencyIterator_isBegin, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_isIncoming", _wrap_AdjacencyIterator_isIncoming, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_getObject", _wrap_AdjacencyIterator_getObject, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator___deref__", _wrap_AdjacencyIterator___deref__, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_increment", _wrap_AdjacencyIterator_increment, METH_VARARGS, NULL},
- { (char *)"AdjacencyIterator_getExactTypeName", _wrap_AdjacencyIterator_getExactTypeName, METH_VARARGS, NULL},
+ { (char *)"AdjacencyIterator_decrement", _wrap_AdjacencyIterator_decrement, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_getId", _wrap_AdjacencyIterator_getId, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_getNature", _wrap_AdjacencyIterator_getNature, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_userdata_set", _wrap_AdjacencyIterator_userdata_set, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_userdata_get", _wrap_AdjacencyIterator_userdata_get, METH_VARARGS, NULL},
+ { (char *)"AdjacencyIterator_duplicate", _wrap_AdjacencyIterator_duplicate, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_A", _wrap_AdjacencyIterator_A, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_B", _wrap_AdjacencyIterator_B, METH_VARARGS, NULL},
{ (char *)"AdjacencyIterator_fedgeA", _wrap_AdjacencyIterator_fedgeA, METH_VARARGS, NULL},
@@ -108217,13 +108519,17 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"new_CurvePointIterator", _wrap_new_CurvePointIterator, METH_VARARGS, NULL},
{ (char *)"delete_CurvePointIterator", _wrap_delete_CurvePointIterator, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_copy", _wrap_CurvePointIterator_copy, METH_VARARGS, NULL},
- { (char *)"CurvePointIterator_CastToInterface0DIterator", _wrap_CurvePointIterator_CastToInterface0DIterator, METH_VARARGS, NULL},
+ { (char *)"CurvePointIterator_castToInterface0DIterator", _wrap_CurvePointIterator_castToInterface0DIterator, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_getExactTypeName", _wrap_CurvePointIterator_getExactTypeName, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator___eq__", _wrap_CurvePointIterator___eq__, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_getObject", _wrap_CurvePointIterator_getObject, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator___deref__", _wrap_CurvePointIterator___deref__, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_isBegin", _wrap_CurvePointIterator_isBegin, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_isEnd", _wrap_CurvePointIterator_isEnd, METH_VARARGS, NULL},
+ { (char *)"CurvePointIterator_increment", _wrap_CurvePointIterator_increment, METH_VARARGS, NULL},
+ { (char *)"CurvePointIterator_decrement", _wrap_CurvePointIterator_decrement, METH_VARARGS, NULL},
+ { (char *)"CurvePointIterator_t", _wrap_CurvePointIterator_t, METH_VARARGS, NULL},
+ { (char *)"CurvePointIterator_u", _wrap_CurvePointIterator_u, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_getX", _wrap_CurvePointIterator_getX, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_getY", _wrap_CurvePointIterator_getY, METH_VARARGS, NULL},
{ (char *)"CurvePointIterator_getZ", _wrap_CurvePointIterator_getZ, METH_VARARGS, NULL},
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index 54a982b8bd8..d7086e4baff 100755
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -112,7 +112,7 @@ void FEdgeXDetector::preProcessShape(WXShape* iWShape) {
preProcessFace((WXFace*)(*f));
}
- vector<WVertex*>& wvertices = iWShape->GetVertexList();
+ vector<WVertex*>& wvertices = iWShape->getVertexList();
for(vector<WVertex*>::iterator wv=wvertices.begin(), wvend=wvertices.end();
wv!=wvend;
++wv){
@@ -219,7 +219,7 @@ void FEdgeXDetector::processSilhouetteShape(WXShape* iWShape) {
// the silhouette edges that are not smooth
// --------------------
vector<WEdge*>::iterator we, weend;
- vector<WEdge*> &wedges = iWShape->GetEdgeList();
+ vector<WEdge*> &wedges = iWShape->getEdgeList();
for(we=wedges.begin(), weend=wedges.end();
we!=weend;
++we)
@@ -298,7 +298,7 @@ void FEdgeXDetector::processBorderShape(WXShape* iWShape) {
// the BORDER
// --------------------
vector<WEdge*>::iterator we, weend;
- vector<WEdge*> &wedges = iWShape->GetEdgeList();
+ vector<WEdge*> &wedges = iWShape->getEdgeList();
for(we=wedges.begin(), weend=wedges.end();
we!=weend;
++we){
@@ -328,7 +328,7 @@ void FEdgeXDetector::processCreaseShape(WXShape* iWShape) {
// the CREASE
// --------------------
vector<WEdge*>::iterator we, weend;
- vector<WEdge*> &wedges = iWShape->GetEdgeList();
+ vector<WEdge*> &wedges = iWShape->getEdgeList();
for(we=wedges.begin(), weend=wedges.end();
we!=weend;
++we){
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h
index 40027e13d80..eaa6d31829b 100755
--- a/source/blender/freestyle/intern/view_map/Interface0D.h
+++ b/source/blender/freestyle/intern/view_map/Interface0D.h
@@ -163,7 +163,7 @@ public:
//
//////////////////////////////////////////////////
-class Interface0DIteratorNested : Iterator
+class Interface0DIteratorNested : public Iterator
{
public:
@@ -215,7 +215,7 @@ public:
* where \a it1 and \a it2 are 2 Interface0DIterator.
* Otherwise, incrementing \a it1 will also increment \a it2.
*/
-class Interface0DIterator
+class Interface0DIterator : public Iterator
{
public:
@@ -248,7 +248,7 @@ public:
}
/*! Returns the string "Interface0DIterator". */
- string getExactTypeName() const {
+ virtual string getExactTypeName() const {
if (!_iterator)
return "Interface0DIterator";
return _iterator->getExactTypeName() + "Proxy";
@@ -306,12 +306,12 @@ public:
}
/*! Increments. */
- void increment() {
+ virtual void increment() {
_iterator->increment();
}
/*! Decrements. */
- void decrement() {
+ virtual void decrement() {
_iterator->decrement();
}
@@ -319,14 +319,14 @@ public:
* first of the 1D element containing the points over
* which we're iterating.
*/
- bool isBegin() const {
+ virtual bool isBegin() const {
return _iterator->isBegin();
}
/*! Returns true if the pointed Interface0D is after the
* after the last point of the 1D element we're iterating from.
*/
- bool isEnd() const {
+ virtual bool isEnd() const {
return _iterator->isEnd();
}
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index c88a3da8967..14d934c6791 100755
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -963,7 +963,7 @@ public:
// vertices
//---------
vector<SVertex*>::iterator sv,svend;
- vector<SVertex*>& verticesList = iBrother.GetVertexList();
+ vector<SVertex*>& verticesList = iBrother.getVertexList();
for(sv=verticesList.begin(), svend=verticesList.end();
sv!=svend;
sv++)
@@ -977,7 +977,7 @@ public:
// edges
//------
vector<FEdge*>::iterator e,eend;
- vector<FEdge*>& edgesList = iBrother.GetEdgeList();
+ vector<FEdge*>& edgesList = iBrother.getEdgeList();
for(e=edgesList.begin(),eend=edgesList.end();
e!=eend;
e++)
@@ -990,7 +990,7 @@ public:
// starting chain edges
//-------------------------
vector<FEdge*>::iterator fe,fend;
- vector<FEdge*>& fedges = iBrother.GetChains();
+ vector<FEdge*>& fedges = iBrother.getChains();
for(fe=fedges.begin(),fend=fedges.end();
fe!=fend;
fe++)
@@ -1392,10 +1392,10 @@ public:
/* accessors */
/*! Returns the list of SVertex of the Shape. */
- inline vector<SVertex*>& GetVertexList() {return _verticesList;} // Get vertices list
+ inline vector<SVertex*>& getVertexList() {return _verticesList;} // Get vertices list
/*! Returns the list of FEdges of the Shape. */
- inline vector<FEdge*>& GetEdgeList() {return _edgesList;} // Get edges list
- inline vector<FEdge*>& GetChains() {return _chains;}
+ inline vector<FEdge*>& getEdgeList() {return _edgesList;} // Get edges list
+ inline vector<FEdge*>& getChains() {return _chains;}
/*! Returns the bounding box of the shape. */
inline const BBox<Vec3r>& bbox() {return _BBox;}
/*! Returns the ith material of the shape. */
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index 3feeb6664df..42c39d5795e 100755
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -87,7 +87,7 @@ void ViewEdgeXBuilder::BuildViewEdges( WXShape *iWShape, ViewShape *oVShape,
//iWShape->ResetUserData();
WXEdge * wxe;
- vector<WEdge*>& wedges = iWShape->GetEdgeList();
+ vector<WEdge*>& wedges = iWShape->getEdgeList();
//
//------------------------------
for(vector<WEdge*>::iterator we=wedges.begin(),weend=wedges.end();
@@ -111,8 +111,8 @@ void ViewEdgeXBuilder::BuildViewEdges( WXShape *iWShape, ViewShape *oVShape,
// Add all these new edges to the scene's feature edges list:
//-----------------------------------------------------------
- vector<FEdge*>& newedges = _pCurrentSShape->GetEdgeList();
- vector<SVertex*>& newVertices = _pCurrentSShape->GetVertexList();
+ vector<FEdge*>& newedges = _pCurrentSShape->getEdgeList();
+ vector<SVertex*>& newVertices = _pCurrentSShape->getVertexList();
vector<ViewVertex*>& newVVertices = _pCurrentVShape->vertices();
vector<ViewEdge*>& newVEdges = _pCurrentVShape->edges();
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index 2691da20057..2ddeb198fff 100755
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -862,7 +862,9 @@ public:
_splittingId = 0;
UpdateFEdges(); // tells every FEdge between iFEdgeA and iFEdgeB that this is theit ViewEdge
}
-protected:
+
+//soc protected:
+
/*! Copy constructor. */
inline ViewEdge(ViewEdge& iBrother)
{
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index 370f44dffcf..3591c67ce1f 100755
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -628,24 +628,24 @@ namespace ViewMapIO {
save(out, vs->sshape()->material(i));
// -> VerticesList (List)
- tmp = vs->sshape()->GetVertexList().size();
+ tmp = vs->sshape()->getVertexList().size();
WRITE(tmp);
- for (vector<SVertex*>::const_iterator i1 = vs->sshape()->GetVertexList().begin();
- i1 != vs->sshape()->GetVertexList().end(); i1++)
+ for (vector<SVertex*>::const_iterator i1 = vs->sshape()->getVertexList().begin();
+ i1 != vs->sshape()->getVertexList().end(); i1++)
WRITE_IF_NON_NULL(*i1);
// -> Chains (List)
- tmp = vs->sshape()->GetChains().size();
+ tmp = vs->sshape()->getChains().size();
WRITE(tmp);
- for (vector<FEdge*>::const_iterator i2 = vs->sshape()->GetChains().begin();
- i2 != vs->sshape()->GetChains().end(); i2++)
+ for (vector<FEdge*>::const_iterator i2 = vs->sshape()->getChains().begin();
+ i2 != vs->sshape()->getChains().end(); i2++)
WRITE_IF_NON_NULL(*i2);
// -> EdgesList (List)
- tmp = vs->sshape()->GetEdgeList().size();
+ tmp = vs->sshape()->getEdgeList().size();
WRITE(tmp);
- for (vector<FEdge*>::const_iterator i3 = vs->sshape()->GetEdgeList().begin();
- i3 != vs->sshape()->GetEdgeList().end(); i3++)
+ for (vector<FEdge*>::const_iterator i3 = vs->sshape()->getEdgeList().begin();
+ i3 != vs->sshape()->getEdgeList().end(); i3++)
WRITE_IF_NON_NULL(*i3);
// ViewEdges (List)
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
index 25da503af66..fa6fb8e1641 100755
--- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
@@ -59,7 +59,7 @@ namespace ViewVertexInternal{
* An instance of an orientedViewEdgeIterator can only
* be obtained from a ViewVertex by calling edgesBegin() or edgesEnd().
*/
- class orientedViewEdgeIterator : Iterator
+ class orientedViewEdgeIterator : public Iterator
{
public:
friend class ViewVertex;
@@ -387,7 +387,7 @@ namespace ViewEdgeInternal {
* ::Caution::: the dereferencing operator returns a *pointer* to
* the pointed ViewEdge.
*/
-class ViewEdgeIterator : Iterator
+class ViewEdgeIterator : public Iterator
{
public:
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index a890fb92c04..42edef0cb6c 100755
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -42,7 +42,7 @@ static bool triangle_obtuse (WVertex*, WFace * f)
bool b=false;
for (int i=0; i<3; i++)
b = b ||
- ((f->GetEdgeList()[i]->getVec3r() * f->GetEdgeList()[(i+1)%3]->getVec3r()) < 0);
+ ((f->getEdgeList()[i]->getVec3r() * f->getEdgeList()[(i+1)%3]->getVec3r()) < 0);
return b;
}
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index 0d02e0ca131..b480b67b3d8 100755
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -249,7 +249,7 @@ WEdge * WEdge::duplicate()
WFace::WFace(WFace& iBrother)
{
- _OEdgeList = iBrother.GetEdgeList();
+ _OEdgeList = iBrother.getEdgeList();
_Normal = iBrother.GetNormal();
_VerticesNormals = iBrother._VerticesNormals;
_VerticesTexCoords = iBrother._VerticesTexCoords;
@@ -478,7 +478,7 @@ WShape::WShape(WShape& iBrother)
_Materials = iBrother._Materials;
_meanEdgeSize = iBrother._meanEdgeSize;
iBrother.bbox(_min, _max);
- vector<WVertex*>& vertexList = iBrother.GetVertexList();
+ vector<WVertex*>& vertexList = iBrother.getVertexList();
vector<WVertex*>::iterator v=vertexList.begin(), vend=vertexList.end();
for(;
v!=vend;
@@ -491,7 +491,7 @@ WShape::WShape(WShape& iBrother)
AddVertex(newVertex);
}
- vector<WEdge*>& edgeList = iBrother.GetEdgeList();
+ vector<WEdge*>& edgeList = iBrother.getEdgeList();
vector<WEdge*>::iterator e=edgeList.begin(), eend=edgeList.end();
for(;
e!=eend;
@@ -564,7 +564,7 @@ WShape::WShape(WShape& iBrother)
f++)
{
unsigned i;
- const vector<WOEdge*>& oedgeList = (*f)->GetEdgeList();
+ const vector<WOEdge*>& oedgeList = (*f)->getEdgeList();
vector<WOEdge*> newoedgelist;
unsigned n = oedgeList.size();
@@ -581,8 +581,8 @@ WShape::WShape(WShape& iBrother)
// Free all memory (arghh!)
// Vertex
- vend = iBrother.GetVertexList().end();
- for(v=iBrother.GetVertexList().begin();
+ vend = iBrother.getVertexList().end();
+ for(v=iBrother.getVertexList().begin();
v!=vend;
v++)
{
@@ -591,8 +591,8 @@ WShape::WShape(WShape& iBrother)
}
// Edges and OEdges:
- eend = iBrother.GetEdgeList().end();
- for(e=iBrother.GetEdgeList().begin();
+ eend = iBrother.getEdgeList().end();
+ for(e=iBrother.getEdgeList().begin();
e!=eend;
e++)
{
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index 99dc83faf96..ea6c793bdfe 100755
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -506,7 +506,7 @@ public:
virtual ~WFace() {}
/*! accessors */
- inline const vector<WOEdge*>& GetEdgeList() {return _OEdgeList;}
+ inline const vector<WOEdge*>& getEdgeList() {return _OEdgeList;}
inline WOEdge * GetOEdge(int i) {return _OEdgeList[i];}
inline Vec3r& GetNormal() {return _Normal;}
inline int GetId() {return _Id;}
@@ -744,8 +744,8 @@ public:
}
/*! accessors */
- inline vector<WEdge *>& GetEdgeList() {return _EdgeList;}
- inline vector<WVertex*>& GetVertexList() {return _VertexList;}
+ inline vector<WEdge *>& getEdgeList() {return _EdgeList;}
+ inline vector<WVertex*>& getVertexList() {return _VertexList;}
inline vector<WFace*>& GetFaceList() {return _FaceList;}
inline unsigned GetId() {return _Id;}
inline void bbox(Vec3r& min, Vec3r& max) {min=_min; max=_max;}
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h
index 0518e70d90b..9ec8fd4bddb 100755
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h
@@ -527,7 +527,7 @@ public:
*/
virtual void Reset(){
// Reset Edges
- vector<WEdge*>& wedges = GetEdgeList();
+ vector<WEdge*>& wedges = getEdgeList();
for(vector<WEdge*>::iterator we=wedges.begin(),weend=wedges.end();
we!=weend;
we++){
diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
index c95231a72dc..cccf876db8b 100755
--- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
@@ -175,7 +175,7 @@ void WingedEdgeBuilder::buildWShape(WShape& shape, IndexedFaceSet& ifs) {
// Parse the built winged-edge shape to update post-flags
set<Vec3r> normalsSet;
- vector<WVertex*>& wvertices = shape.GetVertexList();
+ vector<WVertex*>& wvertices = shape.getVertexList();
for(vector<WVertex*>::iterator wv=wvertices.begin(), wvend=wvertices.end();
wv!=wvend;
++wv){
@@ -238,9 +238,9 @@ void WingedEdgeBuilder::buildTriangleStrip( const real *vertices,
//Then rebuild it:
if(0 == nTriangle%2) // if nTriangle is even
{
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+1]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+2]/3]);
triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2]));
triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+1]],normals[nindices[nTriangle+1]+1],normals[nindices[nTriangle+1]+2]));
@@ -254,9 +254,9 @@ void WingedEdgeBuilder::buildTriangleStrip( const real *vertices,
}
else // if nTriangle is odd
{
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+2]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+1]/3]);
triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2]));
triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+2]],normals[nindices[nTriangle+2]+1],normals[nindices[nTriangle+2]+2]));
@@ -306,9 +306,9 @@ void WingedEdgeBuilder::buildTriangles(const real *vertices,
// Each triplet of vertices is considered as an independent triangle
for(unsigned i = 0; i < nvertices / 3; i++)
{
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+1]/3]);
- triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+2]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i+1]/3]);
+ triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i+2]/3]);
triangleNormals.push_back(Vec3r(normals[nindices[3*i]],normals[nindices[3*i]+1], normals[nindices[3*i]+2]));
triangleNormals.push_back(Vec3r(normals[nindices[3*i+1]],normals[nindices[3*i+1]+1],normals[nindices[3*i+1]+2]));
diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py
index 156eac8d26e..079eb01eb31 100755
--- a/source/blender/freestyle/python/Freestyle.py
+++ b/source/blender/freestyle/python/Freestyle.py
@@ -1142,9 +1142,9 @@ class SShape(_object):
def ComputeBBox(*args): return _Freestyle.SShape_ComputeBBox(*args)
def RemoveEdgeFromChain(*args): return _Freestyle.SShape_RemoveEdgeFromChain(*args)
def RemoveEdge(*args): return _Freestyle.SShape_RemoveEdge(*args)
- def GetVertexList(*args): return _Freestyle.SShape_GetVertexList(*args)
- def GetEdgeList(*args): return _Freestyle.SShape_GetEdgeList(*args)
- def GetChains(*args): return _Freestyle.SShape_GetChains(*args)
+ def getVertexList(*args): return _Freestyle.SShape_getVertexList(*args)
+ def getEdgeList(*args): return _Freestyle.SShape_getEdgeList(*args)
+ def getChains(*args): return _Freestyle.SShape_getChains(*args)
def bbox(*args): return _Freestyle.SShape_bbox(*args)
def material(*args): return _Freestyle.SShape_material(*args)
def materials(*args): return _Freestyle.SShape_materials(*args)
@@ -1566,6 +1566,7 @@ class ViewEdge(Interface1D):
this = _Freestyle.new_ViewEdge(*args)
try: self.this.append(this)
except: self.this = this
+ def duplicate(*args): return _Freestyle.ViewEdge_duplicate(*args)
__swig_destroy__ = _Freestyle.delete_ViewEdge
__del__ = lambda self : None;
def A(*args): return _Freestyle.ViewEdge_A(*args)
@@ -1790,6 +1791,7 @@ class ViewEdgeViewEdgeIterator(_object):
__swig_setmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_set
__swig_getmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_get
if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeViewEdgeIterator_userdata_get, _Freestyle.ViewEdgeViewEdgeIterator_userdata_set)
+ def duplicate(*args): return _Freestyle.ViewEdgeViewEdgeIterator_duplicate(*args)
def A(*args): return _Freestyle.ViewEdgeViewEdgeIterator_A(*args)
def B(*args): return _Freestyle.ViewEdgeViewEdgeIterator_B(*args)
def fedgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeA(*args)
@@ -3247,18 +3249,20 @@ class AdjacencyIterator(_object):
except: self.this = this
__swig_destroy__ = _Freestyle.delete_AdjacencyIterator
__del__ = lambda self : None;
+ def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args)
def isEnd(*args): return _Freestyle.AdjacencyIterator_isEnd(*args)
def isBegin(*args): return _Freestyle.AdjacencyIterator_isBegin(*args)
def isIncoming(*args): return _Freestyle.AdjacencyIterator_isIncoming(*args)
def getObject(*args): return _Freestyle.AdjacencyIterator_getObject(*args)
def __deref__(*args): return _Freestyle.AdjacencyIterator___deref__(*args)
def increment(*args): return _Freestyle.AdjacencyIterator_increment(*args)
- def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args)
+ def decrement(*args): return _Freestyle.AdjacencyIterator_decrement(*args)
def getId(*args): return _Freestyle.AdjacencyIterator_getId(*args)
def getNature(*args): return _Freestyle.AdjacencyIterator_getNature(*args)
__swig_setmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_set
__swig_getmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_get
if _newclass:userdata = _swig_property(_Freestyle.AdjacencyIterator_userdata_get, _Freestyle.AdjacencyIterator_userdata_set)
+ def duplicate(*args): return _Freestyle.AdjacencyIterator_duplicate(*args)
def A(*args): return _Freestyle.AdjacencyIterator_A(*args)
def B(*args): return _Freestyle.AdjacencyIterator_B(*args)
def fedgeA(*args): return _Freestyle.AdjacencyIterator_fedgeA(*args)
@@ -3837,13 +3841,17 @@ class CurvePointIterator(Interface0DIteratorNested):
__swig_destroy__ = _Freestyle.delete_CurvePointIterator
__del__ = lambda self : None;
def copy(*args): return _Freestyle.CurvePointIterator_copy(*args)
- def CastToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_CastToInterface0DIterator(*args)
+ def castToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_castToInterface0DIterator(*args)
def getExactTypeName(*args): return _Freestyle.CurvePointIterator_getExactTypeName(*args)
def __eq__(*args): return _Freestyle.CurvePointIterator___eq__(*args)
def getObject(*args): return _Freestyle.CurvePointIterator_getObject(*args)
def __deref__(*args): return _Freestyle.CurvePointIterator___deref__(*args)
def isBegin(*args): return _Freestyle.CurvePointIterator_isBegin(*args)
def isEnd(*args): return _Freestyle.CurvePointIterator_isEnd(*args)
+ def increment(*args): return _Freestyle.CurvePointIterator_increment(*args)
+ def decrement(*args): return _Freestyle.CurvePointIterator_decrement(*args)
+ def t(*args): return _Freestyle.CurvePointIterator_t(*args)
+ def u(*args): return _Freestyle.CurvePointIterator_u(*args)
def getX(*args): return _Freestyle.CurvePointIterator_getX(*args)
def getY(*args): return _Freestyle.CurvePointIterator_getY(*args)
def getZ(*args): return _Freestyle.CurvePointIterator_getZ(*args)