From a0359c37506d05589bae86e4818fa653c8f281ab Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 08:29:48 +0000 Subject: soc-2008-mxcurioni: added (without testing) the following classes: BBox, SShape, ViewShape. Also corrected a few typos (Get#->get#). --- .../freestyle/intern/winged_edge/Curvature.cpp | 2 +- .../blender/freestyle/intern/winged_edge/WEdge.cpp | 16 ++++++++-------- source/blender/freestyle/intern/winged_edge/WEdge.h | 6 +++--- source/blender/freestyle/intern/winged_edge/WXEdge.h | 2 +- .../intern/winged_edge/WingedEdgeBuilder.cpp | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) (limited to 'source/blender/freestyle/intern/winged_edge') 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& vertexList = iBrother.GetVertexList(); + vector& vertexList = iBrother.getVertexList(); vector::iterator v=vertexList.begin(), vend=vertexList.end(); for(; v!=vend; @@ -491,7 +491,7 @@ WShape::WShape(WShape& iBrother) AddVertex(newVertex); } - vector& edgeList = iBrother.GetEdgeList(); + vector& edgeList = iBrother.getEdgeList(); vector::iterator e=edgeList.begin(), eend=edgeList.end(); for(; e!=eend; @@ -564,7 +564,7 @@ WShape::WShape(WShape& iBrother) f++) { unsigned i; - const vector& oedgeList = (*f)->GetEdgeList(); + const vector& oedgeList = (*f)->getEdgeList(); vector 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& GetEdgeList() {return _OEdgeList;} + inline const vector& 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& GetEdgeList() {return _EdgeList;} - inline vector& GetVertexList() {return _VertexList;} + inline vector& getEdgeList() {return _EdgeList;} + inline vector& getVertexList() {return _VertexList;} inline vector& 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& wedges = GetEdgeList(); + vector& wedges = getEdgeList(); for(vector::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 normalsSet; - vector& wvertices = shape.GetVertexList(); + vector& wvertices = shape.getVertexList(); for(vector::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])); -- cgit v1.2.3