Ignore:
Timestamp:
Apr 9, 2010, 9:55:39 AM (16 years ago)
Author:
heber <heber@…>
Children:
bd8561
Parents:
6250e5
Message:

LinkedNodes is now declared inside LinkedCell and some new functions.

  • as prepraratory measure we placed LinkedNodes as typedef into LinkedCell class. This caused same namespace changes elsewhere where LinkedNodes is used.
  • new function GetallNeighbours() which performs going through linked cells.
  • new function GetPointsInsideaSphere() which performs going through linked cells and returns all neighbours up to a given distance to a given center.

Note: New functions are not yet used elsewhere. Unit test has to be written beforehand.

Signed-off-by: heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.cpp

    • Property mode changed from 100755 to 100644
    r6250e5 r6dd8d3  
    986986  // 2. expand from there
    987987  while ((!TesselStruct->OpenLines.empty()) && (OneLoopWithoutSuccessFlag)) {
    988     // 2a. fill all new OpenLines
     988    // 2a. print OpenLines
    989989    Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl;
    990990    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    991       Log() << Verbose(2) << *(Runner->second) << endl;
    992 
     991      Log() << Verbose(1) << " " << *(Runner->second) << endl;
     992
     993    // 2b. find best candidate for each OpenLine
    993994    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
    994995      baseline = Runner->second;
     
    10001001    }
    10011002
    1002     // 2b. search for smallest ShortestAngle among all candidates
    1003     double ShortestAngle = 4.*M_PI;
     1003    // 2c. print OpenLines with candidates again
    10041004    Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl;
    10051005    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    1006       Log() << Verbose(2) << *(Runner->second) << endl;
    1007 
     1006      Log() << Verbose(1) << " " << *(Runner->second) << endl;
     1007
     1008    // 2d. search for smallest ShortestAngle among all candidates
     1009    double ShortestAngle = 4.*M_PI;
    10081010    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
    10091011      if (Runner->second->ShortestAngle < ShortestAngle) {
     
    10131015      }
    10141016    }
     1017    // 2e. if we found one, add candidate
    10151018    if ((ShortestAngle == 4.*M_PI) || (baseline->pointlist.empty()))
    10161019      OneLoopWithoutSuccessFlag = false;
     
    10191022    }
    10201023
    1021     // write temporary envelope
     1024    // 2f. write temporary envelope
    10221025    if (filename != NULL) {
    10231026      if ((DoSingleStepOutput && ((TesselStruct->TrianglesOnBoundary.size() % SingleStepWidth == 0)))) { // if we have a new triangle and want to output each new triangle configuration
Note: See TracChangeset for help on using the changeset viewer.