Changeset 247 for cpp/frams/model
- Timestamp:
- 11/07/14 17:51:01 (10 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.cpp
r197 r247 129 129 Model::~Model() 130 130 { 131 delmodel_list.action(( long)this);131 delmodel_list.action((intptr_t)this); 132 132 clear(); 133 133 } -
cpp/frams/model/modelparts.cpp
r197 r247 163 163 { 164 164 case 'd': t+=" integer"; 165 { longa,b,c; if (p.getMinMax(i,a,b,c)>=2) t+=SString::sprintf(" %d..%d",a,b);}165 {paInt a,b,c; if (p.getMinMax(i,a,b,c)>=2) t+=SString::sprintf(" %d..%d",a,b);} 166 166 break; 167 167 case 'f': t+=" float"; -
cpp/frams/model/modelparts.h
r197 r247 38 38 MultiRange *mapped; 39 39 enum PartBaseFlags { Selected=1 }; 40 longflags;40 int flags; 41 41 Model *owner; ///< backlink to the model 42 42 … … 80 80 Param extraProperties(); 81 81 Param properties(); 82 longrefno;82 paInt refno; 83 83 Pt3D rot;///< rotation angles 84 84 85 85 /// 86 longshape;///default=old framsticks compatible, do not mix with shapes>086 paInt shape;///default=old framsticks compatible, do not mix with shapes>0 87 87 enum Shape {SHAPE_DEFAULT=0, SHAPE_ELLIPSOID=1, SHAPE_CUBOID=2, SHAPE_CYLINDER=3}; 88 88 double mass,size,density,friction,ingest,assim; … … 119 119 public: 120 120 // base properties: 121 longp1_refno,p2_refno; ///< parts' reference numbers121 paInt p1_refno,p2_refno; ///< parts' reference numbers 122 122 123 123 Part *part1,*part2; ///< references to parts … … 125 125 class Pt3D rot; ///< orientation delta between parts expressed as 3 angles 126 126 enum Shape {SHAPE_DEFAULT=0, SHAPE_SOLID=1}; 127 longshape;///< default=old framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0, solid=merge parts into one physical entity127 paInt shape;///< default=old framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0, solid=merge parts into one physical entity 128 128 129 129 Joint(); … … 159 159 160 160 // do not touch these: 161 longrefno; ///< this joint's reference number161 paInt refno; ///< this joint's reference number 162 162 double stamina; 163 163 double stif,rotstif; ///< stiffness for moving and bending forces … … 189 189 ParamEntry *props; 190 190 bool ownedprops;//< destructor will free props using ParamObject::freeParamTab 191 longprefinputs,prefoutput;192 longpreflocation;191 paInt prefinputs,prefoutput; 192 paInt preflocation; 193 193 int *vectordata; 194 longvisualhints;194 paInt visualhints; 195 195 196 196 //void *impl; … … 220 220 extra inputs may be ignored by the object (depends on the class). 221 221 */ 222 int getPreferredInputs() {return prefinputs;}222 int getPreferredInputs() {return (int)prefinputs;} 223 223 224 224 /** @return 0 if this object doesn't provide useful output signal. */ 225 int getPreferredOutput() {return prefoutput;}225 int getPreferredOutput() {return (int)prefoutput;} 226 226 227 227 /** @return 0 if the object doesn't need any assignment to the body element. … … 229 229 @return 2 = the object prefers to have the Joint ( @see Neuro::attachToJoint() ) 230 230 */ 231 int getPreferredLocation() {return preflocation;}231 int getPreferredLocation() {return (int)preflocation;} 232 232 /** vector drawing to be used in neuro net diagram. 233 233 interpretation: … … 251 251 */ 252 252 int getVisualHints() 253 {return visualhints;}253 {return (int)visualhints;} 254 254 255 255 enum Hint … … 377 377 SyntParam classProperties(bool handle_defaults_when_saving=true); 378 378 // base properties: 379 longrefno; ///< unique reference number (former 'neuro' refno)380 381 longpart_refno; ///< can be used by some items as the part ref#382 longjoint_refno; ///< can be used by some items as the joint ref#379 paInt refno; ///< unique reference number (former 'neuro' refno) 380 381 paInt part_refno; ///< can be used by some items as the part ref# 382 paInt joint_refno; ///< can be used by some items as the joint ref# 383 383 384 384 Pt3D pos,rot; ///< default = zero … … 451 451 or -1 if 'child' is not connected with this Neuro.*/ 452 452 int findInput(Neuro* child) const; 453 void removeInput( int refno);453 void removeInput(paInt refno); 454 454 /** @return reference number of the child connection, like findInput() */ 455 455 int removeInput(Neuro* child); … … 470 470 #ifdef MODEL_V1_COMPATIBLE 471 471 friend class OldItems; 472 longneuro_refno; ///< parent ref# (called neuro_refno for compatibility with old Neuro class), @see moredata473 longconn_refno; ///< the other neuron ref# in N-N connections, can be used by some other items472 paInt neuro_refno; ///< parent ref# (called neuro_refno for compatibility with old Neuro class), @see moredata 473 paInt conn_refno; ///< the other neuron ref# in N-N connections, can be used by some other items 474 474 double weight; ///< weight of the N-N connection and (all?) receptors 475 475 double inertia,force,sigmo; //!!!
Note: See TracChangeset
for help on using the changeset viewer.