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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge/WEdge.cpp')
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index c8805c144e3..0811fe336b7 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -63,7 +63,7 @@ WVertex::WVertex(WVertex &iBrother)
_Shape = iBrother._Shape;
_Smooth = iBrother._Smooth;
_Border = iBrother._Border;
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new vertexdata;
((vertexdata *)(iBrother.userdata))->_copy = this;
}
@@ -84,12 +84,12 @@ void WVertex::incoming_edge_iterator::increment()
WOEdge *twin = _current->twin();
if (!twin) {
// we reached a hole
- _current = 0;
+ _current = nullptr;
return;
}
WOEdge *next = twin->getPrevOnFace();
if (next == _begin) {
- next = NULL;
+ next = nullptr;
}
_current = next;
}
@@ -98,7 +98,7 @@ WFace *WVertex::face_iterator::operator*()
{
WOEdge *woedge = *_edge_it;
if (!woedge) {
- return NULL;
+ return nullptr;
}
return (woedge)->GetbFace();
}
@@ -163,7 +163,7 @@ WVertex::incoming_edge_iterator WVertex::incoming_edges_end()
else {
begin = _EdgeList.front()->GetbOEdge();
}
- return incoming_edge_iterator(this, begin, 0);
+ return incoming_edge_iterator(this, begin, nullptr);
}
#if 0
WOEdge **WVertex::incoming_edge_iterator::operator->()
@@ -194,7 +194,7 @@ WOEdge::WOEdge(WOEdge &iBrother)
_paFace = iBrother.GetaFace();
_pbFace = iBrother.GetbFace();
_pOwner = iBrother.GetOwner();
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new oedgedata;
((oedgedata *)(iBrother.userdata))->_copy = this;
@@ -228,11 +228,11 @@ WOEdge *WOEdge::getPrevOnFace()
WEdge::WEdge(WEdge &iBrother)
{
- _paOEdge = NULL;
- _pbOEdge = NULL;
+ _paOEdge = nullptr;
+ _pbOEdge = nullptr;
WOEdge *aoedge = iBrother.GetaOEdge();
WOEdge *boedge = iBrother.GetbOEdge();
- userdata = NULL;
+ userdata = nullptr;
if (aoedge) {
//_paOEdge = new WOEdge(*aoedge);
@@ -272,7 +272,7 @@ WFace::WFace(WFace &iBrother)
_Id = iBrother.GetId();
_FrsMaterialIndex = iBrother._FrsMaterialIndex;
_Mark = iBrother._Mark;
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new facedata;
((facedata *)(iBrother.userdata))->_copy = this;
}
@@ -332,7 +332,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
// checks whether this edge already exists or not
// If it exists, it points outward v2
bool exist = false;
- WOEdge *pInvertEdge = NULL; // The inverted edge if it exists
+ WOEdge *pInvertEdge = nullptr; // The inverted edge if it exists
vector<WEdge *> &v2Edges = v2->GetEdges();
vector<WEdge *>::iterator it;
for (it = v2Edges.begin(); it != v2Edges.end(); it++) {
@@ -394,7 +394,7 @@ bool WFace::getOppositeEdge(const WVertex *v, WOEdge *&e)
}
vector<WOEdge *>::iterator it;
- e = NULL;
+ e = nullptr;
for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
if ((*it)->GetaVertex() == v) {
e = *it;
@@ -403,7 +403,7 @@ bool WFace::getOppositeEdge(const WVertex *v, WOEdge *&e)
if (!e) {
return false;
}
- e = NULL;
+ e = nullptr;
for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
if (((*it)->GetaVertex() != v) && ((*it)->GetbVertex() != v)) {
e = *it;
@@ -449,7 +449,7 @@ WOEdge *WFace::GetPrevOEdge(WOEdge *iOEdge)
return prev;
}
- return NULL;
+ return nullptr;
}
WShape *WFace::getShape()
@@ -570,22 +570,22 @@ WShape::WShape(WShape &iBrother)
vend = iBrother.getVertexList().end();
for (v = iBrother.getVertexList().begin(); v != vend; ++v) {
delete (vertexdata *)((*v)->userdata);
- (*v)->userdata = NULL;
+ (*v)->userdata = nullptr;
}
// Edges and OEdges:
eend = iBrother.getEdgeList().end();
for (e = iBrother.getEdgeList().begin(); e != eend; ++e) {
delete (edgedata *)((*e)->userdata);
- (*e)->userdata = NULL;
+ (*e)->userdata = nullptr;
// OEdge a:
delete (oedgedata *)((*e)->GetaOEdge()->userdata);
- (*e)->GetaOEdge()->userdata = NULL;
+ (*e)->GetaOEdge()->userdata = nullptr;
// OEdge b:
WOEdge *oedgeb = (*e)->GetbOEdge();
if (oedgeb) {
delete (oedgedata *)(oedgeb->userdata);
- oedgeb->userdata = NULL;
+ oedgeb->userdata = nullptr;
}
}
@@ -593,7 +593,7 @@ WShape::WShape(WShape &iBrother)
fend = iBrother.GetFaceList().end();
for (f = iBrother.GetFaceList().begin(); f != fend; ++f) {
delete (facedata *)((*f)->userdata);
- (*f)->userdata = NULL;
+ (*f)->userdata = nullptr;
}
}
@@ -621,7 +621,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
WFace *face = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial);
if (!face) {
- return NULL;
+ return nullptr;
}
// set the list of per-vertex normals
@@ -649,7 +649,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
if ((iVertexList[0] == iVertexList[1]) || (iVertexList[0] == iVertexList[2]) ||
(iVertexList[2] == iVertexList[1])) {
cerr << "Warning: degenerated triangle detected, correcting" << endl;
- return NULL;
+ return nullptr;
}
}
@@ -695,7 +695,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
}
if (!oedge) {
- return NULL;
+ return nullptr;
}
WEdge *edge = oedge->GetOwner();