diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-17 10:35:30 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-17 10:35:30 +0400 |
commit | e4748940c0a61171d5c4e45d8d5a9637d05ac429 (patch) | |
tree | 12485e1e989e7e1f766c370f92d379ef565599c5 /source/blender/freestyle/intern/winged_edge | |
parent | cc1a6b398da9bd2cec78c4242c5b205f079aa4a6 (diff) |
soc-2008-mxcurioni: SWIG removal - completed SVertex and CurvePoint classes migration. Stabilized a lot of the code for C++ -> Python conversion. Added the correct rich comparison operator and tested it. Corrected 'dupplicate' typo and changde to __copy__ for Python API.
From now on, when a set should be output (PySet_Type), it is given as a list (PyList_Type). The reason is that it doesn't really matter what we bring back to the Python interpreter. The set is guaranteed in memory on the C++ side.
For the CurvePoint class, the userdata variable is not yet ported (and will probably available as a list or a dictionary). The CurvePoint implementation works except for the initialization from other CurvePoints: somehow, the inner variables don't seem to be correctly handled. I do not know if it is a bug in Freestyle or if the CurvePoint object's state is correct for my test case. CurvePoint needs more testing.
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge')
-rwxr-xr-x | source/blender/freestyle/intern/winged_edge/WEdge.cpp | 20 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/winged_edge/WEdge.h | 10 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/winged_edge/WXEdge.h | 8 |
3 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp index 79b3a8dae26..3f27bf6a8a0 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp @@ -70,7 +70,7 @@ WVertex::WVertex(WVertex& iBrother) ((vertexdata*)(iBrother.userdata))->_copy = this; } -WVertex* WVertex::dupplicate() +WVertex* WVertex::duplicate() { WVertex *clone = new WVertex(*this); return clone; @@ -180,7 +180,7 @@ WOEdge::WOEdge(WOEdge& iBrother) ((oedgedata*)(iBrother.userdata))->_copy = this; } -WOEdge * WOEdge::dupplicate() +WOEdge * WOEdge::duplicate() { WOEdge *clone = new WOEdge(*this); return clone; @@ -221,10 +221,10 @@ WEdge::WEdge(WEdge& iBrother) if(NULL != aoedge) //_paOEdge = new WOEdge(*aoedge); - _paOEdge = aoedge->dupplicate(); + _paOEdge = aoedge->duplicate(); if(NULL != boedge) //_pbOEdge = new WOEdge(*boedge); - _pbOEdge = boedge->dupplicate(); + _pbOEdge = boedge->duplicate(); _nOEdges = iBrother.GetNumberOfOEdges(); _Id = iBrother.GetId(); @@ -232,7 +232,7 @@ WEdge::WEdge(WEdge& iBrother) ((edgedata*)(iBrother.userdata))->_copy = this; } -WEdge * WEdge::dupplicate() +WEdge * WEdge::duplicate() { WEdge *clone = new WEdge(*this); return clone; @@ -260,7 +260,7 @@ WFace::WFace(WFace& iBrother) ((facedata*)(iBrother.userdata))->_copy = this; } -WFace * WFace::dupplicate() +WFace * WFace::duplicate() { WFace * clone = new WFace(*this); return clone; @@ -466,7 +466,7 @@ WShape * WFace::getShape() LIB_WINGED_EDGE_EXPORT unsigned WShape::_SceneCurrentId = 0; -WShape * WShape::dupplicate() +WShape * WShape::duplicate() { WShape *clone = new WShape(*this); return clone; @@ -485,7 +485,7 @@ WShape::WShape(WShape& iBrother) v++) { //WVertex *newVertex = new WVertex(*(*v)); - WVertex *newVertex = (*v)->dupplicate(); + WVertex *newVertex = (*v)->duplicate(); newVertex->SetShape(this); AddVertex(newVertex); @@ -498,7 +498,7 @@ WShape::WShape(WShape& iBrother) e++) { //WEdge *newEdge = new WEdge(*(*e)); - WEdge *newEdge = (*e)->dupplicate(); + WEdge *newEdge = (*e)->duplicate(); AddEdge(newEdge); } @@ -509,7 +509,7 @@ WShape::WShape(WShape& iBrother) f++) { //WFace *newFace = new WFace(*(*f)); - WFace *newFace = (*f)->dupplicate(); + WFace *newFace = (*f)->duplicate(); AddFace(newFace); } diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 1ab37246469..b4c6a38f5bd 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -68,7 +68,7 @@ public: inline WVertex(const Vec3r &v) {_Id = 0; _Vertex = v; userdata = NULL; _Shape = NULL;_Smooth=true;_Border=-1;} /*! Copy constructor */ WVertex(WVertex& iBrother); - virtual WVertex * dupplicate(); + virtual WVertex * duplicate(); virtual ~WVertex() {} /*! accessors */ @@ -314,7 +314,7 @@ public: /*! copy constructor */ WOEdge(WOEdge& iBrother); - virtual WOEdge * dupplicate(); + virtual WOEdge * duplicate(); /*! accessors */ // inline WOEdge *GetaCWEdge() {return _paCWEdge;} @@ -393,7 +393,7 @@ public: /*! Copy constructor */ WEdge(WEdge& iBrother); - virtual WEdge * dupplicate(); + virtual WEdge * duplicate(); virtual ~WEdge() { @@ -502,7 +502,7 @@ public: inline WFace() {userdata = NULL;_MaterialIndex = 0;} /*! copy constructor */ WFace(WFace& iBrother); - virtual WFace * dupplicate(); + virtual WFace * duplicate(); virtual ~WFace() {} /*! accessors */ @@ -709,7 +709,7 @@ public: inline WShape() {_meanEdgeSize = 0;_Id = _SceneCurrentId; _SceneCurrentId++;} /*! copy constructor */ WShape(WShape& iBrother); - virtual WShape * dupplicate(); + virtual WShape * duplicate(); virtual ~WShape() { if(_EdgeList.size() != 0) diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index 66204ba5e99..8c53bb8390e 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -58,7 +58,7 @@ public: WXVertex(WXVertex& iBrother) : WVertex(iBrother) {_curvatures = new CurvatureInfo(*iBrother._curvatures);} - virtual WVertex * dupplicate() + virtual WVertex * duplicate() { WXVertex *clone = new WXVertex(*this); return clone; @@ -109,7 +109,7 @@ public: inline WXEdge(WXEdge& iBrother) : WEdge(iBrother) {_nature = iBrother.nature();_front = iBrother._front;_order = iBrother._order;} - virtual WEdge * dupplicate() + virtual WEdge * duplicate() { WXEdge *clone = new WXEdge(*this); return clone; @@ -334,7 +334,7 @@ public: _SmoothLayers.push_back(new WXFaceLayer(**wxf)); } } - virtual WFace * dupplicate() + virtual WFace * duplicate() { WXFace * clone = new WXFace(*this); return clone; @@ -471,7 +471,7 @@ public: { _computeViewIndependant = iBrother._computeViewIndependant; } - virtual WShape * dupplicate() + virtual WShape * duplicate() { WXShape *clone = new WXShape(*this); return clone; |