Changeset 1065 for cpp/frams/model
- Timestamp:
- 01/27/21 12:20:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/similarity/simil-measure-base.cpp
r1048 r1065 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 26 26 models[1] = newModel(genos[1]); 27 27 28 if (models[0] == NULL) 29 logPrintf("SimilMeasureBase", "evaluateDistance", LOG_ERROR, "Unable to create a Model from genotype '%s'.", G0->getGenes().c_str()); 30 if (models[1] == NULL) 31 logPrintf("SimilMeasureBase", "evaluateDistance", LOG_ERROR, "Unable to create a Model from genotype '%s'.", G1->getGenes().c_str()); 28 32 if (models[0] == NULL || models[1] == NULL) 29 {30 logPrintf("SimilarityMeasure", "EvaluateDistance", LOG_ERROR, "Unable to create model from one of the genotypes.");31 33 return -1; 32 } 33 34 34 35 double distance = getDistance(); 35 36 SAFEDELETE(models[0]); … … 67 68 Model SimilMeasureBase::sampleSurface(Model* M, double density) 68 69 { 69 70 71 70 Model resultModel; 71 resultModel.open(); 72 GeometryUtils::addAnchorToModel(resultModel); 72 73 73 74 74 MeshBuilder::ModelSurface iterator(density); 75 iterator.initialize(M); 75 76 76 77 78 79 80 77 Pt3D point; 78 while (iterator.tryGetNext(point)) 79 { 80 GeometryUtils::addPointToModel(point, resultModel); 81 } 81 82 82 83 83 resultModel.close(); 84 return resultModel; 84 85 }
Note: See TracChangeset
for help on using the changeset viewer.