Changeset 932 for cpp/frams/model
- Timestamp:
- 05/28/20 18:00:45 (4 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/defassign-f0-SDK.h
r915 r932 25 25 vcolor.z=1.0; 26 26 } 27 27 28 28 29 … … 119 120 120 121 122 121 123 void Neuro::defassign() 122 124 { … … 126 128 vis_style="neuro"; 127 129 } 130 128 131 129 132 … … 184 187 185 188 189 -
cpp/frams/model/f0-SDK-classes.h
r920 r932 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 20Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2015 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 172 172 {"Vstyle",2,0,"vis_style","s 0 0 neuro",FIELD(vis_style),}, 173 173 {"getInputCount",0,1+2,"input count","d",GETONLY(inputCount),}, 174 {"getInputNeuroDef",0, 1+2,"get input neuron","p oNeuroDef(d)",PROCEDURE(p_getInputNeuroDef),},175 {"getInputNeuroIndex",0, 1+2,"get input neuron index","p d(d)",PROCEDURE(p_getInputNeuroIndex),},176 {"getInputWeight",0, 1+2,"get input weight","p f(d)",PROCEDURE(p_getInputWeight),},174 {"getInputNeuroDef",0,0,"get input neuron","p oNeuroDef(d)",PROCEDURE(p_getInputNeuroDef),}, 175 {"getInputNeuroIndex",0,0,"get input neuron index","p d(d)",PROCEDURE(p_getInputNeuroIndex),}, 176 {"getInputWeight",0,0,"get input weight","p f(d)",PROCEDURE(p_getInputWeight),}, 177 177 {"classObject",0,1+2,"neuron class","oNeuroClass",GETONLY(classObject),}, 178 178 {0,0,0,} -
cpp/frams/model/model.h
r896 r932 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 19Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 93 93 94 94 public: 95 enum ShapeType { SHAPE_ UNKNOWN, SHAPE_ILLEGAL, SHAPE_BALL_AND_STICK, SHAPE_SOLIDS};95 enum ShapeType { SHAPE_BALL_AND_STICK = 0, SHAPE_SOLIDS = 1, SHAPE_UNKNOWN, SHAPE_ILLEGAL }; 96 96 /// used in internalCheck() 97 97 enum CheckType { -
cpp/frams/model/modelparts.cpp
r926 r932 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 19Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 98 98 NeuroClass::NeuroClass(ParamEntry *_props, SString _description, 99 99 int _prefinputs, int _prefoutput, int _preflocation, 100 int *_vectordata, bool own_vd, int vhints )100 int *_vectordata, bool own_vd, int vhints, int sup_shapes) 101 101 :ownedvectordata(own_vd), 102 102 name(_props->name), longname(_props->id), description(_description), … … 105 105 prefoutput(_prefoutput), 106 106 preflocation(_preflocation), 107 supported_shape_types(sup_shapes), 107 108 vectordata(_vectordata), 108 109 visualhints(vhints), impl_count(0),/*impl(0),*/active(1), genactive(0) -
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.