Changeset 544 for cpp/frams/model/model.h
- Timestamp:
- 07/28/16 01:09:29 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.h
r522 r544 119 119 120 120 public: 121 enum Shape { SHAPE_UNKNOWN, SHAPE_ILLEGAL, SHAPE_OLD, SHAPE_NEW};121 enum ShapeType { SHAPE_UNKNOWN, SHAPE_ILLEGAL, SHAPE_BALL_AND_STICK, SHAPE_SOLIDS }; 122 122 protected: 123 Shape shape;123 ShapeType shape; 124 124 125 125 void updateNeuroRefno(); // set Neuro::refno for all neurons … … 156 156 int isValid() const { return buildstatus == valid; } 157 157 int getErrorPosition(bool includingwarnings = false); 158 Shape getShape(){ return shape; }158 ShapeType getShapeType() const { return shape; } 159 159 160 160 void updateRefno(); // set ::refno for all elements … … 359 359 360 360 /** create new Part and add it to the model. @see addPart() */ 361 Part *addNewPart(Part::Shape shape = Part::SHAPE_ DEFAULT) { return addPart(new Part(shape)); }361 Part *addNewPart(Part::Shape shape = Part::SHAPE_BALL_AND_STICK) { return addPart(new Part(shape)); } 362 362 /** create new Joint and add it to the model. @see addJoint() */ 363 Joint *addNewJoint(Part *p1 = NULL, Part *p2 = NULL, Joint::Shape shape = Joint::SHAPE_ DEFAULT) { Joint *j = addJoint(new Joint()); j->shape = shape; if ((p1 != NULL) && (p2 != NULL)) j->attachToParts(p1, p2); return j; }363 Joint *addNewJoint(Part *p1 = NULL, Part *p2 = NULL, Joint::Shape shape = Joint::SHAPE_BALL_AND_STICK) { Joint *j = addJoint(new Joint()); j->shape = shape; if ((p1 != NULL) && (p2 != NULL)) j->attachToParts(p1, p2); return j; } 364 364 /** create new Neuro and add it to the model. @see addNeuro() */ 365 365 Neuro *addNewNeuro() { return addNeuro(new Neuro()); }
Note: See TracChangeset
for help on using the changeset viewer.