Changeset 726 for cpp/frams/genetics/f1
- Timestamp:
- 01/19/18 19:37:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f1/conv_f1.cpp
r719 r726 111 111 Builder builder(g, map ? 1 : 0); 112 112 builder.model.open(); 113 builder.grow(-1, g, Pt3D_0, stdprops, -1); // uses Model:: singleStepBuildto create model elements113 builder.grow(-1, g, Pt3D_0, stdprops, -1); // uses Model::addFromString() to create model elements 114 114 if (builder.invalid) return SString(); 115 115 builder.addPendingInputs(); … … 323 323 { 324 324 double len = min(2.0, c.length); 325 sprintf(tmp, " j:p1=%ld,p2=%ld,dx=%lg,rx=%lg,ry=%lg,rz=%lg,stam=%lg,vr=%g,vg=%g,vb=%g",325 sprintf(tmp, "p1=%ld,p2=%ld,dx=%lg,rx=%lg,ry=%lg,rz=%lg,stam=%lg,vr=%g,vg=%g,vb=%g", 326 326 part1, part2, len, angle.x, angle.y, angle.z, c.stamina, c.cred, c.cgreen, c.cblue); 327 327 lastjoint_muscle_power = c.muscle_power; 328 return model. singleStepBuild(tmp, makeRange(g));328 return model.addFromString(Model::JointType, tmp, makeRange(g)); 329 329 } 330 330 331 331 int Builder::growPart(F1Props &c, const char *g) 332 332 { 333 sprintf(tmp, " p:dn=%lg,fr=%lg,ing=%lg,as=%lg,vs=%g,vr=%g,vg=%g,vb=%g",333 sprintf(tmp, "dn=%lg,fr=%lg,ing=%lg,as=%lg,vs=%g,vr=%g,vg=%g,vb=%g", 334 334 1.0 / c.weight, c.friction, c.ingestion, c.assimilation, c.visual_size, c.cred, c.cgreen, c.cblue); 335 return model. singleStepBuild(tmp, makeRange(g));335 return model.addFromString(Model::PartType, tmp, makeRange(g)); 336 336 } 337 337
Note: See TracChangeset
for help on using the changeset viewer.