Created
July 20, 2011 19:22
-
-
Save roxlu/1095704 to your computer and use it in GitHub Desktop.
Defining outside loop?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline std::vector<HE_Edge*> HE_Selection::getOuterEdges() { | |
HE_Selection copy = getCopy(); | |
copy.collectEdges(); | |
const std::vector<HE_Edge*>& copy_edges = copy.getEdgesRef(); | |
const std::vector<HE_Edge*>::const_iterator it = copy_edges.begin(); | |
HE_Edge* e = NULL; | |
HE_Face* f1 = NULL; | |
HE_Face* f2 = NULL; | |
std::vector<HE_Edge*> result; | |
while(it != copy_edges.end()) { | |
e = (*it); | |
f1 = e->getFirstFace(); | |
f2 = e->getSecondFace(); | |
if( (f1 == NULL) || (f2 == NULL) || (!containsFace(f1)) || (!constainsFace(f2)) { | |
result.push_back(e); | |
} | |
} | |
return result; | |
} | |
// ---------- or inside loop | |
inline std::vector<HE_Edge*> HE_Selection::getOuterEdges() { | |
HE_Selection copy = getCopy(); | |
copy.collectEdges(); | |
const std::vector<HE_Edge*>& copy_edges = copy.getEdgesRef(); | |
const std::vector<HE_Edge*>::const_iterator it = copy_edges.begin(); | |
HE_Edge* e = NULL; | |
std::vector<HE_Edge*> result; | |
while(it != copy_edges.end()) { | |
e = (*it); | |
HE_Face* f1 = e->getFirstFace(); | |
HE_Face* f2 = e->getSecondFace(); | |
if( (f1 == NULL) || (f2 == NULL) || (!containsFace(f1)) || (!constainsFace(f2)) { | |
result.push_back(e); | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment