Changeset 1056 for cpp/frams/genetics/fS
- Timestamp:
- 12/28/20 02:06:52 (4 years ago)
- Location:
- cpp/frams/genetics/fS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fS/fS_general.cpp
r1032 r1056 12 12 #include "../genooperators.h" 13 13 #include "common/nonstd_math.h" 14 #include "../../model/geometry/part_distance_estimator.h"14 #include <frams/model/geometry/part_distance_estimator.h> 15 15 16 16 int fS_Genotype::precision = 4; … … 482 482 Pt3D scale; 483 483 calculateScale(scale); 484 return GeometryUtils::isSolidPartScaleValid(partShape, scale );484 return GeometryUtils::isSolidPartScaleValid(partShape, scale, true); //2020-12: mac->JS: I set the last argument to true because this is how the original code worked, but I think it should be ensureCircleSection? 485 485 } 486 486 … … 910 910 Part *parentTmpPart = PartDistanceEstimator::buildTemporaryPart(parent->partShape, parentScale, parent->getRotation()); 911 911 912 double result;913 912 tmpPart->p = state->v; 914 result = PartDistanceEstimator::calculateDistance(*tmpPart, *parentTmpPart, genotypeParams.distanceTolerance, genotypeParams.relativeDensity); 915 913 double result = PartDistanceEstimator::calculateDistance(*tmpPart, *parentTmpPart, genotypeParams.distanceTolerance, genotypeParams.relativeDensity); 916 914 917 915 delete tmpPart; -
cpp/frams/genetics/fS/fS_oper.cpp
r1032 r1056 339 339 { 340 340 geno.getState(false); 341 mutateScaleParam(newNode, SCALE_X, true); 341 mutateScaleParam(newNode, SCALE_X, true); //TODO 2020-12: mac->JS: should be true or rather ensureCircleSection? 342 342 mutateScaleParam(newNode, SCALE_Y, true); 343 343 mutateScaleParam(newNode, SCALE_Z, true); -
cpp/frams/genetics/fS/fS_oper.h
r1030 r1056 142 142 143 143 /** 144 * Change the value of the scale parameter by given multiplier145 * Do not change the value if any of the scale restrictions is not satisfied 144 * Change the value of the scale parameter by a given multiplier. 145 * Do not change the value if any of the scale restrictions is not satisfied. 146 146 * @param paramKey 147 147 * @param multiplier 148 148 * @param ensureCircleSection 149 * @return True if the parameter value was change , false otherwise149 * @return True if the parameter value was changed, false otherwise 150 150 */ 151 151 bool mutateScaleParam(Node *node, string key, bool ensureCircleSection);
Note: See TracChangeset
for help on using the changeset viewer.