--- trunk/src/selection/SelectionEvaluator.cpp 2005/02/15 19:36:07 351 +++ trunk/src/selection/SelectionEvaluator.cpp 2005/03/10 16:14:07 418 @@ -49,7 +49,9 @@ namespace oopse { namespace oopse { -SelectionEvaluator::SelectionEvaluator(SimInfo* si) : info(si), nameFinder(info), distanceFinder(info), isLoaded_(false){ +SelectionEvaluator::SelectionEvaluator(SimInfo* si) + : info(si), nameFinder(info), distanceFinder(info), indexFinder(info), isLoaded_(false){ + nStuntDouble = info->getNGlobalAtoms() + info->getNRigidBodies(); } @@ -84,9 +86,6 @@ void SelectionEvaluator::clearState() { } void SelectionEvaluator::clearState() { - //for (int i = scriptLevelMax; --i >= 0; ) - // stack[i].clear(); - //scriptLevel = 0; error = false; errorMessage = ""; } @@ -228,7 +227,6 @@ BitSet SelectionEvaluator::comparatorInstruction(const compareProperty(atom, bs, property, comparator, comparisonValue); } - //change the positions of atoms which belong to the rigidbodies for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { compareProperty(rb, bs, property, comparator, comparisonValue); } @@ -401,7 +399,7 @@ BitSet SelectionEvaluator::indexInstruction(const boos if (index < 0 || index >= bs.size()) { invalidIndex(index); } else { - bs.setBitOn(index); + bs = indexFinder.find(index); } } else if (value.type() == typeid(std::pair)) { std::pair indexRange= boost::any_cast >(value); @@ -409,15 +407,11 @@ BitSet SelectionEvaluator::indexInstruction(const boos if (indexRange.first < 0 || indexRange.second >= bs.size()) { invalidIndexRange(indexRange); }else { - bs.setRangeOn(indexRange.first, indexRange.second); + bs = indexFinder.find(indexRange.first, indexRange.second); } } return bs; } -//BitSet SelectionEvaluator::evaluate(int frameNo) { -// -//} - }