Ignore:
Timestamp:
06/22/23 03:47:26 (17 months ago)
Author:
Maciej Komosinski
Message:
  • fH: don't mutate non-standard properties: assimilation, ingestion, stamina, density
  • fH: allow relative mutation probabilities in the range 0..100, like in other genetic formats
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/fH/fH_general.cpp

    r973 r1257  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2023  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    1616// Methods for loading handles
    1717
    18 const char *fH_part_names[FH_PART_PROPS_COUNT] = { "dn", "fr", "ing", "as" };
    19 
    20 const char *fH_joint_names[FH_JOINT_PROPS_COUNT] = { "stif", "rotstif", "stam" };
     18const char *fH_part_names[FH_PART_PROPS_COUNT] = { "fr" }; // , "dn", "ing", "as" };
     19
     20const char *fH_joint_names[FH_JOINT_PROPS_COUNT] = { "stif", "rotstif" }; //, "stam" };
    2121
    2222void fH_Handle::loadProperties(Param par)
     
    376376        model->addPart(newpart);
    377377
    378         newpart->density = partprops[0];
    379         newpart->friction = partprops[1];
    380         newpart->ingest = partprops[2];
    381         newpart->assim = partprops[3];
     378        newpart->friction = partprops[0]; //Macko 2023-06: TODO partprops[0] is different from par.getDoubleById("fr"); (and par.getDoubleById() is used in createJoint() below, investigate why this difference and whether hardcoded references to fields like here could be avoided? Only use fH_part_names if possible.)
     379        //newpart->density = partprops[1];
     380        //newpart->ingest = partprops[2];
     381        //newpart->assim = partprops[3];
    382382
    383383        if (createmapping) newpart->addMapping(ranges);
     
    399399        newjoint->stif = par.getDoubleById("stif");
    400400        newjoint->rotstif = par.getDoubleById("rotstif");
    401         newjoint->stamina = par.getDoubleById("stam");
     401        //newjoint->stamina = par.getDoubleById("stam");
    402402        newjoint->attachToParts(firstpart, secondpart);
    403403        if (createmapping) newjoint->addMapping(IRange(begin, end));
Note: See TracChangeset for help on using the changeset viewer.