Changeset 1039


Ignore:
Timestamp:
11/30/20 03:44:14 (7 weeks ago)
Author:
Maciej Komosinski
Message:

Removed Part's "visual thickness" property

Location:
cpp/frams
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/config/f0-SDK.def

    r1012 r1039  
    2828PROP(i,1,0,`info',s,,,,info)
    2929PROP(Vstyle,2,0,vis_style,s,0,0,part,vis_style)
    30 XPROP(vs,2,0,visual thickness,f,0.05,0.7,0.2,vsize)
    3130XPROP(vr,2,0,red component,f,0.0,1.0,1.0,vcolor.x)
    3231XPROP(vg,2,1024,green component,f,0.0,1.0,1.0,vcolor.y)
  • cpp/frams/config/f0.def

    r1012 r1039  
    2828PROP(i,1,0,`info',s,,,,info)
    2929PROP(Vstyle,2,0,vis_style,s,0,0,part,vis_style)
    30 XPROP(vs,2,0,visual thickness,f,0.05,0.7,0.2,vsize)
    3130XPROP(vr,2,0,red component,f,0.0,1.0,1.0,vcolor.x)
    3231XPROP(vg,2,1024,green component,f,0.0,1.0,1.0,vcolor.y)
  • cpp/frams/genetics/f1/f1_conv.cpp

    r830 r1039  
    282282int Builder::growPart(GeneProps &c, const char *g)
    283283{
    284         sprintf(tmp, "dn=%lg,fr=%lg,ing=%lg,as=%lg,vs=%g,vr=%g,vg=%g,vb=%g",
    285                 1.0 / c.weight, c.friction, c.ingestion, c.assimilation, c.visual_size, c.cred, c.cgreen, c.cblue);
     284        sprintf(tmp, "dn=%lg,fr=%lg,ing=%lg,as=%lg,vr=%g,vg=%g,vb=%g",
     285                1.0 / c.weight, c.friction, c.ingestion, c.assimilation, c.cred, c.cgreen, c.cblue);
    286286        return model.addFromString(Model::PartType, tmp, makeRange(g));
    287287}
  • cpp/frams/genetics/f9/f9_conv.cpp

    r973 r1039  
    153153                        averagecolor += j->vcolor;
    154154                p->vcolor = averagecolor / count;
    155                 if (count > 5) count = 5; //avoid too fat...
    156                 p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is
    157155        }
    158156        //m.getPart(0)->vcolor = Pt3D(0, 0, 0); //mark first Part black - a visual aid for easier editing
  • cpp/frams/genetics/geneprops.cpp

    r759 r1039  
    2424        muscle_reset_range = true;
    2525
    26         visual_size = 0.2;
    2726        cred = 0.5;
    2827        cgreen = 0.5;
     
    8988        case 'B': cblue += (1.0 - cblue)*0.25;  break;
    9089        case 'b': cblue += (0.0 - cblue)*0.25;  break;
    91         case 'H': visual_size += (0.7 - visual_size)*0.25;  break;
    92         case 'h': visual_size += (0.05 - visual_size)*0.25;  break;
    9390
    9491        default: return -1;
     
    112109        normalizeBiol4();
    113110
    114         visual_size = 0.5*visual_size + 0.5 * standard_values.visual_size;
    115 
    116111        if (use_f1_muscle_reset_range)
    117112        {
  • cpp/frams/genetics/geneprops.h

    r772 r1039  
    1313
    1414
    15 #define F14_MODIFIERS_VISUAL "DdGgBbHh"
     15#define F14_MODIFIERS_VISUAL "DdGgBb"
    1616#define F14_MODIFIERS_RARE "EeWwAaSs" //expdef would need to handle these properly/specifically to ensure reasonable behavior, and hardly any expdef does. Modifying initial energy of a creature as a result of its genes (Ee) is in general not a good idea. Weight (Ww) works only in water, and in water sinking/going up should usually be caused by real "intentional" activity of a creature, not by its inherited weight. For assimilation (Aa), there is a dedicated parameter in CreaturesGroup. Stamina (Ss) is no longer needed as destructive collisions are not supported, and even if they were, some expdef would need to impose reasonable restrictions on the value of this parameter (e.g. similar to normalizeBiol4()) so there is some cost associated with it, and the specific consequences of destructions should be defined as needed.
    1717#define F14_MODIFIERS "LlRrCcQqFfMmIi" F14_MODIFIERS_RARE F14_MODIFIERS_VISUAL
     
    5050        bool muscle_reset_range;  ///<Used only by conv_f1
    5151
    52         double visual_size;       ///<incremented by H, decremented by h. Part's visual size, only affects appearance
    5352        double cred;              ///<incremented by D, decremented by d. Part's red color proportion
    5453        double cgreen;            ///<incremented by B, decremented by b. Part's blue color proportion
  • cpp/frams/model/defassign-f0-SDK.h

    r952 r1039  
    2020assim=0.25;
    2121vis_style="part";
    22 vsize=0.2;
    2322vcolor.x=1.0;
    2423vcolor.y=1.0;
  • cpp/frams/model/f0-SDK-classes.h

    r1012 r1039  
    2424ParamEntry f0_part_paramtab[]=
    2525{
    26  {"Geometry",3,22,"p",NULL,0,NULL,NULL,"Part"},
     26 {"Geometry",3,21,"p",NULL,0,NULL,NULL,"Part"},
    2727 {"Other properties",},
    2828 {"Visual",},
     
    4545 {"i",1,0,"info","s",FIELD(info),},
    4646 {"Vstyle",2,0,"vis_style","s 0 0 part",FIELD(vis_style),},
    47  {"vs",2,0,"visual thickness","f 0.05 0.7 0.2",FIELD(vsize),},
    4847 {"vr",2,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
    4948 {"vg",2,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
     
    5352ParamEntry f0_part_xtra_paramtab[]=
    5453{
    55  {"Extra properties",1,9,"p"},
     54 {"Extra properties",1,8,"p"},
    5655 {"h",0,0,"hollow","f 0 1 0",FIELD(hollow),},
    5756 {"dn",0,0,"density","f 0.2 5.0 1.0",FIELD(density),},
     
    5958 {"ing",0,0,"ingestion","f 0.0 1.0 0.25",FIELD(ingest),},
    6059 {"as",0,0,"assimilation","f 0.0 1.0 0.25",FIELD(assim),},
    61  {"vs",0,0,"visual thickness","f 0.05 0.7 0.2",FIELD(vsize),},
    6260 {"vr",0,0,"red component","f 0.0 1.0 1.0",FIELD(vcolor.x),},
    6361 {"vg",0,1024,"green component","f 0.0 1.0 1.0",FIELD(vcolor.y),},
  • cpp/frams/model/model.cpp

    r1002 r1039  
    920920                        VALIDMINMAX(p, Part, ingest);
    921921                        VALIDMINMAX(p, Part, assim);
    922                         VALIDMINMAX(p, Part, vsize);
    923922                        VALIDMINMAX(p, Part, vcolor.x);
    924923                        VALIDMINMAX(p, Part, vcolor.y);
  • cpp/frams/model/modelparts.cpp

    r999 r1039  
    591591        refno = src.refno;
    592592        vcolor = src.vcolor;
    593         vsize = src.vsize;
    594593        vis_style = src.vis_style;
    595594        shape = src.shape;
  • cpp/frams/model/modelparts.h

    r1004 r1039  
    111111
    112112        Pt3D vcolor;
    113         double vsize;
    114113
    115114        Part(enum Shape s = SHAPE_BALL);
Note: See TracChangeset for help on using the changeset viewer.