Changeset 611 for cpp/frams/model
- Timestamp:
- 09/09/16 15:21:47 (8 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.cpp
r610 r611 997 997 else 998 998 { // abs.positioning -> calc. delta 999 if (check !=EDITING_CHECK)999 if (check != EDITING_CHECK) 1000 1000 { 1001 1001 // calc orient delta … … 1012 1012 } 1013 1013 } 1014 if (check !=LIVE_CHECK)1014 if (check != LIVE_CHECK) 1015 1015 { 1016 1016 if (j->shape != Joint::SHAPE_FIXED) -
cpp/frams/model/model.h
r610 r611 122 122 /// used in internalCheck() 123 123 enum CheckType { 124 125 126 124 EDITING_CHECK, ///< Used in Model::validate(). Default validation - does not modify elements of the Model. 125 FINAL_CHECK, ///< Used in Model::close() when a Model is built from a genotype. Like EDITING_CHECK, but also calculates Joint::d and Joint::rot. 126 LIVE_CHECK ///< used in Model::close() when a Model is built from a Creature. Like FINAL_CHECK but does not limit joint length which could make some liveModels invalid. 127 127 }; 128 128 protected: … … 310 310 /// It also calls "validate" with all side effects. 311 311 /// @return > 0 means "valid" 312 int close(bool building_live_model =false);312 int close(bool building_live_model = false); 313 313 314 314 /// Enable model building. … … 459 459 For ball-and-stick-type Models, the new temporary Model is created (using Model::buildUsingSolidShapeTypes). 460 460 Useful for making the solids-only code work for both solids Models and ball-and-stick Models, without if's and special cases, like in this example: 461 461 462 462 void fun(const Model& input) // 'input' can be any shape type 463 463 { 464 465 466 464 SolidsShapeTypeModel converted(input); // 'converted' contains either 'input' or the new solids-type Model created from 'input' 465 functionAcceptingSolidsTypeModel(converted); // operator const Model&() is called automatically because of the function signature 466 int n=converted.getModel().getPartCount(); // getting the const Model& explicitly (converted.getPartCount() would fail) 467 467 } 468 */468 */ 469 469 class SolidsShapeTypeModel 470 470 {
Note: See TracChangeset
for help on using the changeset viewer.