Ignore:
Timestamp:
05/29/20 15:18:48 (4 years ago)
Author:
Maciej Komosinski
Message:

Introduced 'volume' field available by getMinPart(), getMaxPart(), getDefPart() for genetic operators to limit the range of volumes (~mass) in simulation of solids

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r915 r934  
    13281328//////////////////////
    13291329
    1330 class MinPart : public Part { public: MinPart() { Param par(f0_part_paramtab, this); par.setMin(); } };
    1331 class MaxPart : public Part { public: MaxPart() { Param par(f0_part_paramtab, this); par.setMax(); } };
     1330class MinPart : public Part_MinMaxDef { public: MinPart() { Param par(f0_part_paramtab, this); par.setMin(); Param par2(f0_part_minmaxdef_paramtab, this); par2.setMin(); } };
     1331class MaxPart : public Part_MinMaxDef { public: MaxPart() { Param par(f0_part_paramtab, this); par.setMax(); Param par2(f0_part_minmaxdef_paramtab, this); par2.setMax(); } };
    13321332class MinJoint : public Joint { public: MinJoint() { Param par(f0_joint_paramtab, this); par.setMin(); } };
    13331333class MaxJoint : public Joint { public: MaxJoint() { Param par(f0_joint_paramtab, this); par.setMax(); } };
     
    13351335class MaxNeuro : public Neuro { public: MaxNeuro() { Param par(f0_neuro_paramtab, this); par.setMax(); } };
    13361336
    1337 Part &Model::getMinPart() { static MinPart part; return part; }
    1338 Part &Model::getMaxPart() { static MaxPart part; return part; }
    1339 Part &Model::getDefPart() { static Part part; return part; }
     1337Part_MinMaxDef &Model::getMinPart() { static MinPart part; return part; }
     1338Part_MinMaxDef &Model::getMaxPart() { static MaxPart part; return part; }
     1339Part_MinMaxDef &Model::getDefPart() { static Part_MinMaxDef part; return part; }
    13401340Joint &Model::getMinJoint() { static MinJoint joint; return joint; }
    13411341Joint &Model::getMaxJoint() { static MaxJoint joint; return joint; }
Note: See TracChangeset for help on using the changeset viewer.