Changeset 70c4567 for molecuilder/src/tesselation.cpp
- Timestamp:
- Aug 10, 2009, 4:11:47 PM (16 years ago)
- Children:
- ada6d2
- Parents:
- 0cf171
- File:
-
- 1 edited
-
molecuilder/src/tesselation.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/tesselation.cpp
r0cf171 r70c4567 208 208 * \return NULL - if endpoint not contained in BoundaryLineSet, or pointer to BoundaryPointSet otherwise 209 209 */ 210 inlineclass BoundaryPointSet *BoundaryLineSet::GetOtherEndpoint(class BoundaryPointSet *point)210 class BoundaryPointSet *BoundaryLineSet::GetOtherEndpoint(class BoundaryPointSet *point) 211 211 { 212 212 if (endpoints[0] == point) … … 1044 1044 // add Walker to boundary points 1045 1045 *out << Verbose(2) << "Adding " << *Walker << " to BoundaryPoints." << endl; 1046 AddPoint(Walker); 1047 if (BPS[0] != NULL) 1046 if (AddPoint(Walker,0)) 1048 1047 NewPoint = BPS[0]; 1049 1048 else … … 1100 1099 /** Adds an point to the tesselation::PointsOnBoundary list. 1101 1100 * \param *Walker point to add 1102 */ 1103 void 1104 Tesselation::AddPoint(TesselPoint *Walker) 1101 * \param n TesselStruct::BPS index to put pointer into 1102 * \return true - new point was added, false - point already present 1103 */ 1104 bool 1105 Tesselation::AddPoint(TesselPoint *Walker, int n) 1105 1106 { 1106 1107 PointTestPair InsertUnique; 1107 BPS[ 0] = new class BoundaryPointSet(Walker);1108 InsertUnique = PointsOnBoundary.insert(PointPair(Walker->nr, BPS[ 0]));1109 if (InsertUnique.second) // if new point was not present before, increase counter1108 BPS[n] = new class BoundaryPointSet(Walker); 1109 InsertUnique = PointsOnBoundary.insert(PointPair(Walker->nr, BPS[n])); 1110 if (InsertUnique.second) { // if new point was not present before, increase counter 1110 1111 PointsOnBoundaryCount++; 1111 else { 1112 delete(BPS[0]); 1113 BPS[0] = NULL; 1112 return true; 1113 } else { 1114 delete(BPS[n]); 1115 BPS[n] = InsertUnique.first->second; 1116 return false; 1114 1117 } 1115 1118 }
Note:
See TracChangeset
for help on using the changeset viewer.
