Changeset 664
- Timestamp:
- 04/26/17 19:22:20 (8 years ago)
- Location:
- cpp/frams/genetics/f9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f9/conv_f9.cpp
r643 r664 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2017 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 50 50 perturbPartLocations(m); 51 51 #endif 52 setColors(m );52 setColors(m, recently_added); 53 53 m.close(); 54 54 if (m.getPartCount() < 2) //only one part <=> there were no valid turtle commands in the input genotype … … 122 122 } 123 123 124 void GenoConv_f90::setColors(Model &m ) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes124 void GenoConv_f90::setColors(Model &m, int last_added_part) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes 125 125 { 126 126 //a rainbow on Joints: from the first one red, through middle green, to blue or violet - last … … 155 155 p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is 156 156 } 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 157 159 } 158 160 -
cpp/frams/genetics/f9/conv_f9.h
r286 r664 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2017 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 42 42 int findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &new_vertex); 43 43 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 purposes44 void setColors(Model &m, int last_added_part); //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes 45 45 void perturbPartLocations(Model &m); //deterministic "body noise", see APPLY_DETERMINISTIC_BODY_NOISE 46 46 };
Note: See TracChangeset
for help on using the changeset viewer.