Changeset 64 for cpp/gdk/model.cpp


Ignore:
Timestamp:
01/28/11 23:29:40 (13 years ago)
Author:
Maciej Komosinski
Message:

a lot of minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/gdk/model.cpp

    r5 r64  
    1 // This file is a part of Framsticks GDK library.
    2 // Copyright (C) 2002-2006  Szymon Ulatowski.  See LICENSE.txt for details.
    3 // Refer to http://www.frams.alife.pl/ for further information.
     1// This file is a part of the Framsticks GDK library.
     2// Copyright (C) 2002-2011  Szymon Ulatowski.  See LICENSE.txt for details.
     3// Refer to http://www.framsticks.com/ for further information.
    44
    55#include "nonstd.h"
     
    960960                        }
    961961                        }
    962                 if (final) if (j->d()>getMaxJoint().d.x)
     962                if (final)
     963                        {
     964                        if (j->d()>getMaxJoint().d.x)
    963965                        {
    964966                        ret=0;
    965967                        FMprintf("Model","internalCheck",FMLV_ERROR,"delta too big in joint #%d (%s)",
    966968                                 i,(const char*)geno.getName());
     969                        }
     970                        else if (j->d()<getMinJoint().d.x)
     971                        {
     972                        ret=0;
     973                        FMprintf("Model","internalCheck",FMLV_ERROR,"delta too small in joint #%d (%s)",
     974                                 i,(const char*)geno.getName());
     975                        }
    967976                        }
    968977                }
     
    12591268class MaxNeuro: public Neuro {public: MaxNeuro() {Param par(f0_neuro_paramtab,this);par.setMax();}};
    12601269
    1261 const Part& Model::getMinPart() {static MinPart part; return part;}
    1262 const Part& Model::getMaxPart() {static MaxPart part; return part;}
    1263 const Part& Model::getDefPart() {static Part part; return part;}
    1264 const Joint& Model::getMinJoint() {static MinJoint joint; return joint;}
    1265 const Joint& Model::getMaxJoint() {static MaxJoint joint; return joint;}
    1266 const Joint& Model::getDefJoint() {static Joint joint; return joint;}
    1267 const Neuro& Model::getMinNeuro() {static MinNeuro neuro; return neuro;}
    1268 const Neuro& Model::getMaxNeuro() {static MaxNeuro neuro; return neuro;}
    1269 const Neuro& Model::getDefNeuro() {static Neuro neuro; return neuro;}
     1270Part& Model::getMinPart() {static MinPart part; return part;}
     1271Part& Model::getMaxPart() {static MaxPart part; return part;}
     1272Part& Model::getDefPart() {static Part part; return part;}
     1273Joint& Model::getMinJoint() {static MinJoint joint; return joint;}
     1274Joint& Model::getMaxJoint() {static MaxJoint joint; return joint;}
     1275Joint& Model::getDefJoint() {static Joint joint; return joint;}
     1276Neuro& Model::getMinNeuro() {static MinNeuro neuro; return neuro;}
     1277Neuro& Model::getMaxNeuro() {static MaxNeuro neuro; return neuro;}
     1278Neuro& Model::getDefNeuro() {static Neuro neuro; return neuro;}
Note: See TracChangeset for help on using the changeset viewer.