Changeset 605 for cpp/frams/model/similarity/simil_model.cpp
 Timestamp:
 08/30/16 17:39:10 (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/similarity/simil_model.cpp
r601 r605 34 34 35 35 static ParamEntry MSparam_tab[] = { 36 {"Creature: Similarity", 1, 5, "ModelSimilarity", "Evaluates morphological dissimilarity. More information:\nhttp://www.framsticks.com/node/795\nhttp://www.framsticks.com/node/890", },36 {"Creature: Similarity", 1, 6, "ModelSimilarity", "Evaluates morphological dissimilarity. More information:\nhttp://www.framsticks.com/node/795\nhttp://www.framsticks.com/node/890", }, 37 37 {"simil_parts", 0, 0, "Weight of parts count", "f 0 100 0", FIELD(m_adFactors[0]), "Differing number of parts is also handled by the 'part degree' similarity component.",}, 38 38 {"simil_partdeg", 0, 0, "Weight of parts' degree", "f 0 100 1", FIELD(m_adFactors[1]), "",}, 39 39 {"simil_neuro", 0, 0, "Weight of neurons count", "f 0 100 0.1", FIELD(m_adFactors[2]), "",}, 40 40 {"simil_partgeom", 0, 0, "Weight of parts' geometric distances", "f 0 100 0", FIELD(m_adFactors[3]), "",}, 41 {"evaluateDistance", 0, PARAM_DONTSAVE  PARAM_USERHIDDEN, "evaluate model dissimilarity", "p f(oGeno,oGeno)", PROCEDURE(p_evaldistance), "Calculates dissimilarity between two models created from Geno objects.",}, 41 {"simil_fixedZaxis", 0, 0, "Fix 'z' (vertical) axis?", "d 0 1 0", FIELD(fixedZaxis), "", }, 42 {"evaluateDistance", 0, PARAM_DONTSAVE  PARAM_USERHIDDEN, "evaluate model dissimilarity", "p f(oGeno,oGeno)", PROCEDURE(p_evaldistance), "Calculates dissimilarity between two models created from Geno objects.", }, 42 43 {0,}, 43 44 }; … … 1997 1998 // get the position of the Part 1998 1999 P1Pos = P1>p; 1999 if (zFixed== 1)2000 if (fixedZaxis == 1) 2000 2001 { 2001 P1Pos.z = 0; 2002 P1Pos.z = 0; //fixed vertical axis, so pretend all points are on the xy plane 2002 2003 } 2003 2004 for (iP2 = 0; iP2 < pModel>getPartCount(); iP2++) … … 2007 2008 // get the position of the Part 2008 2009 P2Pos = P2>p; 2009 if (zFixed== 1)2010 if (fixedZaxis == 1) 2010 2011 { 2011 P2Pos.z = 0; 2012 P2Pos.z = 0; //fixed vertical axis, so pretend all points are on the xy plane 2012 2013 } 2013 2014 // compute the geometric (Euclidean) distance between the Parts … … 2019 2020 2020 2021 MatrixTools::SVD(vEigenvalues, nSize, pDistances, m_aPositions[ iMod ]); 2021 if (zFixed == 1)2022 if (fixedZaxis == 1) //restore the original vertical coordinate of each Part 2022 2023 { 2023 for (int coord = 0; coord < pModel>getPartCount(); coord++)2024 for (int part = 0; part < pModel>getPartCount(); part++) 2024 2025 { 2025 m_aPositions[ iMod ][coord].z = pModel>getPart(coord)>p.z;2026 m_aPositions[iMod][part].z = pModel>getPart(part)>p.z; 2026 2027 } 2027 2028 }
Note: See TracChangeset
for help on using the changeset viewer.