Changeset 975 for cpp/frams/model
- Timestamp:
- 07/06/20 23:32:03 (4 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.cpp
r972 r975 415 415 { 416 416 *f0map = *map; 417 if ( geno.getFormat() != '0')417 if (!Geno::formatIsOneOf(geno.getFormat(), Geno::F0_FORMAT_LIST)) 418 418 { 419 419 MultiMap tmp; -
cpp/frams/model/modelparts.cpp
r973 r975 99 99 NeuroClass::NeuroClass(ParamEntry *_props, SString _description, 100 100 int _prefinputs, int _prefoutput, int _preflocation, 101 int *_vectordata, bool own_vd, int vhints, int sup_shapes )101 int *_vectordata, bool own_vd, int vhints, int sup_shapes, int sup_joints) 102 102 :ownedvectordata(own_vd), 103 103 name(_props->name), longname(_props->id), description(_description), -
cpp/frams/model/modelparts.h
r972 r975 227 227 static constexpr int SUPPORTED_SHAPE_ALL = SUPPORTED_SHAPE_BALL_AND_STICK | SUPPORTED_SHAPE_SOLIDS; 228 228 paInt supported_shape_types; //< bitfield of 'Model::shape' values: NeuroClass::SUPPORTED_SHAPE_xxx = 1 << Model::SHAPE_xxx 229 230 static constexpr int SUPPORTED_JOINT_BALL_AND_STICK = 1; 231 static constexpr int SUPPORTED_JOINT_FIXED = 2; 232 static constexpr int SUPPORTED_JOINT_HINGE_X = 4; 233 static constexpr int SUPPORTED_JOINT_HINGE_XY = 8; 234 static constexpr int SUPPORTED_JOINT_ALL = SUPPORTED_JOINT_BALL_AND_STICK + SUPPORTED_JOINT_FIXED + SUPPORTED_JOINT_HINGE_X + SUPPORTED_JOINT_HINGE_XY; 235 paInt supported_joint_types; //< bitfield of 'Joint::shape' values: NeuroClass::SUPPORTED_JOINT_xxx = 1 << JOINT::SHAPE_xxx 236 229 237 int *vectordata; 230 238 paInt visualhints; … … 240 248 NeuroClass(); 241 249 NeuroClass(ParamEntry *_props, SString _description, 242 int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0, int sup_shapes = NeuroClass::SUPPORTED_SHAPE_ALL);250 int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0, int sup_shapes = NeuroClass::SUPPORTED_SHAPE_ALL, int sup_joints = NeuroClass::SUPPORTED_JOINT_ALL); 243 251 /** class name for use in Neuro::setClassName(), Neuro::setDetails() (former 'moredata' field), 244 252 eg. "N","-",G" */ … … 278 286 int getSupportedShapeTypes() { return (int)supported_shape_types; } 279 287 bool isShapeTypeSupported(ModelEnum::ShapeType t) { return (1 << (int)t) & supported_shape_types; } 288 int getSupportedJointTypes() { return (int)supported_joint_types; } 289 bool isJointTypeSupported(Joint::Shape t) { return (1 << (int)t) & supported_joint_types; } 280 290 int *getSymbolGlyph() 281 291 {
Note: See TracChangeset
for help on using the changeset viewer.