Changeset 932 for cpp/frams/model/modelparts.h
- Timestamp:
- 05/28/20 18:00:45 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/modelparts.h
r920 r932 124 124 class Pt3D d; ///< position delta between parts 125 125 class Pt3D rot; ///< orientation delta between parts expressed as 3 angles 126 enum Shape { SHAPE_BALL_AND_STICK = 0, ///< old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with part.shape>0 127 SHAPE_FIXED = 1, ///< merge parts into one physical entity 128 SHAPE_HINGE_X = 2, ///< hinge connection, revolving around X axis defined by hinge_pos and hinge_rot 129 SHAPE_HINGE_XY = 3 }; ///< double hinge connection, revolving around X and Y axes defined by hinge_pos and hinge_rot 126 enum Shape { 127 SHAPE_BALL_AND_STICK = 0, ///< old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with part.shape>0 128 SHAPE_FIXED = 1, ///< merge parts into one physical entity 129 SHAPE_HINGE_X = 2, ///< hinge connection, revolving around X axis defined by hinge_pos and hinge_rot 130 SHAPE_HINGE_XY = 3 ///< double hinge connection, revolving around X and Y axes defined by hinge_pos and hinge_rot 131 }; 130 132 paInt shape;///< values of type Shape (paInt for integration with Param) 131 133 class Pt3D hinge_pos; ///< hinge position (relative to part1) for HINGE_X and HINGE_XY … … 199 201 paInt prefinputs, prefoutput; 200 202 paInt preflocation; 203 204 static constexpr int SUPPORTED_SHAPE_BALL_AND_STICK = 1; 205 static constexpr int SUPPORTED_SHAPE_SOLIDS = 2; 206 static constexpr int SUPPORTED_SHAPE_ALL = SUPPORTED_SHAPE_BALL_AND_STICK | SUPPORTED_SHAPE_SOLIDS; 207 paInt supported_shape_types; //< bitfield of 'Model::shape' values: NeuroClass::SUPPORTED_SHAPE_xxx = 1 << Model::SHAPE_xxx 201 208 int *vectordata; 202 209 paInt visualhints; … … 212 219 NeuroClass(); 213 220 NeuroClass(ParamEntry *_props, SString _description, 214 int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0 );221 int _prefinputs, int _prefoutput, int _preflocation, int *_vectordata, bool own_vd = 1, int vhints = 0, int sup_shapes = NeuroClass::SUPPORTED_SHAPE_ALL); 215 222 /** class name for use in Neuro::setClassName(), Neuro::setDetails() (former 'moredata' field), 216 223 eg. "N","-",G" */ … … 248 255 } 249 256 */ 257 int getSupportedShapeTypes() { return (int)supported_shape_types; } 250 258 int *getSymbolGlyph() 251 259 {
Note: See TracChangeset
for help on using the changeset viewer.