Changeset 664


Ignore:
Timestamp:
04/26/17 19:22:20 (8 years ago)
Author:
Maciej Komosinski
Message:

Mark last Part white - a visual aid for easier editing of f9 genotypes

Location:
cpp/frams/genetics/f9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f9/conv_f9.cpp

    r643 r664  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    5050        perturbPartLocations(m);
    5151#endif
    52         setColors(m);
     52        setColors(m, recently_added);
    5353        m.close();
    5454        if (m.getPartCount() < 2) //only one part <=> there were no valid turtle commands in the input genotype
     
    122122}
    123123
    124 void GenoConv_f90::setColors(Model &m) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes
     124void GenoConv_f90::setColors(Model &m, int last_added_part) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes
    125125{
    126126        //a rainbow on Joints: from the first one red, through middle green, to blue or violet - last
     
    155155                p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is
    156156        }
     157        //m.getPart(0)->vcolor = Pt3D(0, 0, 0); //mark first Part black - a visual aid for easier editing
     158        m.getPart(last_added_part)->vcolor = Pt3D(1, 1, 1); //mark last Part white - a visual aid for easier editing
    157159}
    158160
  • cpp/frams/genetics/f9/conv_f9.h

    r286 r664  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2017  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    4242        int findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &new_vertex);
    4343        int addNewVertex(Model &m, vector<XYZ_LOC> &punkty, const XYZ_LOC &nowypunkt);
    44         void setColors(Model &m); //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes
     44        void setColors(Model &m, int last_added_part); //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes
    4545        void perturbPartLocations(Model &m); //deterministic "body noise", see APPLY_DETERMINISTIC_BODY_NOISE
    4646};
Note: See TracChangeset for help on using the changeset viewer.